Francois Gouget : winetest/build-patterns: Tweak the failure color gradients.
Alexandre Julliard
julliard at winehq.org
Tue May 4 16:23:26 CDT 2021
Module: tools
Branch: master
Commit: f5079e629f772c3bf44c955d9f3ebbc9b689a8cd
URL: https://source.winehq.org/git/tools.git/?a=commit;h=f5079e629f772c3bf44c955d9f3ebbc9b689a8cd
Author: Francois Gouget <fgouget at codeweavers.com>
Date: Tue May 4 17:23:48 2021 +0200
winetest/build-patterns: Tweak the failure color gradients.
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 at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
winetest/build-patterns | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/winetest/build-patterns b/winetest/build-patterns
index ea9cd4c..fe285cc 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)
More information about the wine-cvs
mailing list