From: Mischa POSLAWSKY Date: Sun, 1 Nov 2015 00:38:31 +0000 (+0100) Subject: termcol: generate 88-colour map using common function X-Git-Tag: v1.9~95 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/5348c0a9f077660a1495942ad1f977baeccf4a0c?hp=c37471e7de29ef22e46af32074478bd86a48a0b1 termcol: generate 88-colour map using common function --- diff --git a/termcol.plp b/termcol.plp index d945079..18593ab 100644 --- a/termcol.plp +++ b/termcol.plp @@ -228,22 +228,10 @@ for my $term (@termlist) {

88-colour space

<: -for my $r (0 .. 3) { - print ''; - for my $g (0 .. 3) { - print ''; - for my $b (0 .. 3) { - my $index = $r*4*4 + $g*4 + $b + 16; - print colcell($index, map {(0, 139, 205, 255)[$_]} $r, $g, $b); - } - } - print "
\n"; -} -print "\n"; - -print ''; -print colcell(80+$_, (($_ + 2 + ($_>0)) * 255/11) x 3) for 0 .. 7; -print "
\n\n"; +print coltable_hsv(4, + sub {(0, 139, 205, 255)[$_]}, + [map { ($_ + 2 + ($_>0)) * 255/11 } 0 .. 7], +); :>
<: if ($ENV{PATH_INFO} =~ /256/) { :>