termcol: numeric module version requirements
[sheet.git] / termcol.inc.pl
index eef6a8b0b0c96d1f39c66f7ac370e8e9975abb12..f1813ca299470354d1b9bd37bb9a48ef6eee8be0 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,15 +200,16 @@ 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',
                name => 'Arne',
                list => [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
+                       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
                )],
                hueorder => [ 3,7,8,11,10,9,13,14 , 4,6,5,15,12,0,1,2 ],
                ansiorder => [ 0,3,10,6,13,12,9,1 , 5,7,11,8,14,4,15,2 ],
@@ -259,7 +266,7 @@ use Shiar_Sheet::Colour '1.02';
                                map { map { hex } /(..)/g } [qw(
                                        000000 1B1B76 3636D8  761F28 623870 953EA7  CC3636 CE4B7A E3669A
                                        1B761B 197F96 1986F2  8C6E1A 8E8E8E 9C9EE7  E48E2A EAA597 FE80FE
-                                       8DD836 B8D1B5 97E9D1  54BF47 37C79F 35CFE4  EDD446 EBE4A4 FFFFFF
+                                       54BF47 37C79F 35CFE4  8DD836 B8D1B5 97E9D1  EDD446 EBE4A4 FFFFFF
                                )]->[$index]
                        },
                        [ # gameboy ramp
@@ -269,6 +276,24 @@ use Shiar_Sheet::Colour '1.02';
                ],
                parent => 'cpc',
        },
+       shiar => {
+               name => 'Shiar32',
+               table => [
+                       [qw( 761F28:2A CC2222:3A CC8B7B:4A 000000:0 )],
+                       [qw( 4C3C2B:1B CB4B16:3B EB8931:5B 444444:1 )],
+                       [qw( 5E581A:2C B58900:3C C0C070:4C 686868:2 )],
+                       [qw(         0 859900:3D         0 B0B0B0:3 )],
+                       [qw( 1B661B:2E 4E9A06:3E 8BBB7B:4E CCCCCC:4 )],
+                       [qw(         0 37A76F:3F         0 FFFFFF:5 )],
+                       [qw( 2F484E:1G 06989A:3G 31E2C2:5G )],
+                       [qw(         0 0088CC:3H         0 )],
+                       [qw( 00337C:2I 3465A4:3I 6899AA:4I )],
+                       [qw(         0 6C71C4:3J         0 )],
+                       [qw( 362747:1K 75507B:3K F06FCB:5K )],
+                       [qw(         0 D33662:3L         0 )],
+               ],
+               parent => 'cpc',
+       },
        ppu => {
                name => '<abbr title="Picture Processing Unit">PPU</abbr> (Famicom/NES)',
                table => [