From: Mischa POSLAWSKY Date: Fri, 4 Dec 2009 19:37:54 +0000 (+0000) Subject: termcol: fix index numbers of 88-colour greyscale ramp X-Git-Tag: v1.3~74 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/c9e24e105a536e99e4c2221e9e3dffe15eb78132?hp=18a6f92cf7a37023188712560bbb12bc96c24b2c termcol: fix index numbers of 88-colour greyscale ramp Loop with sequence number so index can be derived. Replace measured colour values with equivalent algorithm. --- diff --git a/termcol.plp b/termcol.plp index 10d68ac..ee27125 100644 --- a/termcol.plp +++ b/termcol.plp @@ -104,7 +104,7 @@ for my $r (0 .. 3) { print "\n"; print ''; -print colcell(80, ($_) x 3) for 46, 92, 115, 139, 162, 185, 208, 231; +print colcell(80+$_, (($_ + 2 + ($_>0)) * 255/11) x 3) for 0 .. 7; print "
\n\n"; :>