Start from a 'darker cyan' when we need a lot of colors. Stick to lighter shades when few colors are needed for better color consistency and aesthetics.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- winetest/build-patterns | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/winetest/build-patterns b/winetest/build-patterns index ea9cd4c1d..fe285cc5b 100755 --- a/winetest/build-patterns +++ b/winetest/build-patterns @@ -621,11 +621,6 @@ sub blend($$$) return $r; }
-my @keycolors = ([0, 255, 255], # cyan - [0, 255, 0], # green - [255, 255, 0], # yellow - [255, 0, 0], # red -);
# Use colors to differentiate the set values. Each unique value is assigned # a color (in HTML format) picked along a series of gradients passing by the @@ -633,6 +628,12 @@ my @keycolors = ([0, 255, 255], # cyan sub compute_set_colors($) { my ($set) = @_; + + my @keycolors = ([0, 255, 255], # cyan + [0, 255, 0], # green + [255, 255, 0], # yellow + [255, 0, 0]); # red + my @values = sort { $a <=> $b } keys %$set; my $count = @values; if ($count == 1) @@ -641,6 +642,10 @@ sub compute_set_colors($) } else { + # Start from a 'darker cyan' for increased contrast + # when many colors are needed. + $keycolors[0] = [0, 179, 179] if ($count > 10); + my $k = 0; my ($start, $end) = (-1, 0); for (0..$count-1)