termcol: preset groups in include
[sheet.git] / termcol.inc.pl
index eef6a8b0b0c96d1f39c66f7ac370e8e9975abb12..9152f6bc8fac95038981283125332d67b638f4a6 100644 (file)
@@ -1,8 +1,13 @@
 use strict;
 use 5.010;
-use Shiar_Sheet::Colour '1.02';
+use Shiar_Sheet::Colour '1.05';
 
 +{
+       default => [qw( ansi xkcd ansi88 )],
+       more    => [qw( ansi mirc legacy ansi256 )],
+       ansi    => [qw( cga xterm tango app html cgarne )],
+       legacy  => [qw( c64 msx2 mac2 risc arnegame cpc )],
+
        html => {
                title => 'HTML keywords (inherited by CSSā‰„2.1 and SVG), mostly identical to X11',
                href => 'http://www.w3.org/TR/css3-color/#html4',
@@ -149,8 +154,8 @@ use Shiar_Sheet::Colour '1.02';
                        }
 
                        # convert to rgb
-                       $y *= 255 / 32;
-                       $_ = $_ * 127.5 + 128 for $u, $v;
+                       $y /= 32;
+                       $_ /= 2 for $u, $v;
                        Shiar_Sheet::Colour->newyuv($y, $u, $v)->rgb48;
                } qw(
                        0    32  10+5 20-5 12+2 16-2 8+0  24-0
@@ -159,12 +164,13 @@ use Shiar_Sheet::Colour '1.02';
                ansiorder => [ 0,2,5,9,6,4,3,15 , 11,10,13,7,14,8,12,1 ],
                hueorder => [ 2,8,7,5,3,6,4,9 , 10,13,14,0,11,12,15,1 ],
        },
+
+       msx => [qw( msx1 msx2 arnejmp )],
        msx1 => {
                name => 'MSX',
                list => [ map {
                        my ($y, @c) = split /;/;
-                       $y *= 255;
-                       $_ = ($_ - .47) / .53 * 127.5 + 128 for @c;
+                       $_ = ($_ - .47) / .53 / 2 for @c;
                        Shiar_Sheet::Colour->newyuv($y, @c)->rgb48;
                } qw(
                        0.00;0.47;0.47 0.00;0.47;0.47 0.53;0.20;0.07 0.67;0.27;0.17
@@ -194,6 +200,7 @@ use Shiar_Sheet::Colour '1.02';
                )],
                parent => 'msx1',
        },
+
        arnegame => {
                href => 'http://androidarts.com/palette/16pal.htm',
                title => 'Generic 16 color game palette v20 by Arne Niklas Jansson',