From: Mischa POSLAWSKY Date: Sun, 1 Nov 2015 03:06:34 +0000 (+0100) Subject: termcol: amstrad cpc palette (27-colour hsv) X-Git-Tag: v1.9~86 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/332ef38b8fac2c85650019759eede4a95c1fa623 termcol: amstrad cpc palette (27-colour hsv) --- diff --git a/termcol.plp b/termcol.plp index 04b6e6e..4f97aba 100644 --- a/termcol.plp +++ b/termcol.plp @@ -221,6 +221,16 @@ for my $term (@termlist) { } print "\n\n"; } + +if (exists $get{v}) { + print "\n"; + print "\n"; + print coltable_hsv(3, sub { + $_[2] + 3 * ($_[0] + 3 * $_[1]), + map { $_ && $_ * 127 + 1 } @_ + }); + print "
Amstrad CPC
\n\n"; +} :>
@@ -238,7 +248,7 @@ sub coltable_hsv { my %greymap; # name => value my @colmap; # saturation => value => hue => [name, r,g,b] - my $offset = 16; + my $offset = 16 * ($dim > 3); for my $r (0 .. $dim - 1) { for my $g (0 .. $dim - 1) {