termcol: annotate game colour names
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 26 Oct 2015 15:20:42 +0000 (16:20 +0100)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 26 Oct 2015 22:46:41 +0000 (23:46 +0100)
termcol.plp

index c15e6764a3044d9143ebe48ffbd52281b7d45ac0..c3bdbd28cb6f8c268f9b2b3d298c8c8ea14dbde8 100644 (file)
@@ -164,8 +164,10 @@ my %col = (
                        'Generic 16 color game palette by Arne Niklas Jansson',
                        'game',
                ),
-               qw/ 000000 9D9D9D FFFFFF BE2633 E06F8B 493C2B A46422 EB8931
-                   F7E26B 2F484E 44891A A3CE27 1B2632 005784 31A2F2 B2DCEF /,
+               qw/ 000000::void     9D9D9D::ash     FFFFFF::blind   BE2633::bloodred
+                   E06F8B::pigmeat  493C2B::oldpoop A46422::newpoop EB8931::blaze
+                   F7E26B::zornskin 2F484E::shade   44891A::leaf    A3CE27::slime
+                   1B2632::night    005784::sea     31A2F2::sky     B2DCEF::cloud /,
        ],
 );
 
@@ -173,7 +175,7 @@ for my $term (qw/cga xterm tango app html xkcd/) {
        print '<table>', "\n";
        printf "<caption>%s</caption>\n", $col{$term}[0] || $term;
        for my $num (1 .. $#{ $col{$term} }) {
-               my ($rgb, $name) = split /:/, $col{$term}[$num], 2;
+               my ($rgb, $name) = split /:/, $col{$term}[$num], 3;
                $name ||= $num - 1;
                $name = [ $name, ['#333'] ] if $term eq 'xkcd';
                print '<tr>', colcell($name, $rgb);