X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/53beb697f81d7715d042af69374e599dceb3f8e0..f77b44a0b81543dbb467122d73ae30c3caba473f:/termcol.plp diff --git a/termcol.plp b/termcol.plp index 8d707ec..6cc6fea 100644 --- a/termcol.plp +++ b/termcol.plp @@ -179,8 +179,9 @@ sub coltable_hsv { } $h = 1; # greyscale hue - $s = 1; # lowest saturation for other hues - $v = $s = $vmax if !$v; # black at full saturation + $s = $smax - $v + 1; # spread brightness over saturation groups + $v &&= $smax # highest saturation + or $v = $s = 1; # black at initial column } $h *= $hmax; @@ -197,7 +198,7 @@ sub coltable_hsv { my $huerow = $colmap[0][0]; # first {$_} map { @{$_} } @colmap; for my $h (grep { $huerow->[$_] } 0 .. $#{$huerow}) { $out .= ''; - $out .= colcell(@$_) for map { $_->[$h] } map { @{$_} } @colmap; + $out .= colcell(@$_) for map { $_->[$h] } map { reverse @{$_} } @colmap; } if (@greymap) {