git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b03aa8f
)
termcol: rgb table columns from dark to light
author
Mischa POSLAWSKY
<perl@shiar.org>
Sat, 7 Nov 2015 22:13:55 +0000
(23:13 +0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Tue, 5 Jan 2016 00:05:07 +0000
(
01:05
+0100)
termcol.plp
patch
|
blob
|
history
diff --git
a/termcol.plp
b/termcol.plp
index 8d707ecdf700bf727ee3c9f27630904a3310c9f1..6cc6fea2b5c403cde6a67c05ddd09c876e0ce1ec 100644
(file)
--- a/
termcol.plp
+++ b/
termcol.plp
@@
-179,8
+179,9
@@
sub coltable_hsv {
}
$h = 1; # greyscale hue
}
$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;
}
$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 .= '<tr>';
my $huerow = $colmap[0][0]; # first {$_} map { @{$_} } @colmap;
for my $h (grep { $huerow->[$_] } 0 .. $#{$huerow}) {
$out .= '<tr>';
- $out .= colcell(@$_) for map { $_->[$h] } map { @{$_} } @colmap;
+ $out .= colcell(@$_) for map { $_->[$h] } map {
reverse
@{$_} } @colmap;
}
if (@greymap) {
}
if (@greymap) {