X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/1817da53c95ec932b3b5633649661ef1b17f0c55..87b84f183ea2518e7cf0505bcfee8a444983442b:/termcol.inc.pl diff --git a/termcol.inc.pl b/termcol.inc.pl index c1966f0..9152f6b 100644 --- a/termcol.inc.pl +++ b/termcol.inc.pl @@ -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', @@ -208,6 +215,16 @@ use Shiar_Sheet::Colour '1.02'; ansiorder => [ 0,3,10,6,13,12,9,1 , 5,7,11,8,14,4,15,2 ], lumorder => [ 0,5,9,12 , 3,6,10,13,1 , 4,7,8,11,14,15,2 ], # by brightness }, + cgarne => { + href => 'http://androidarts.com/palette/16pal.htm', + title => "version E", + name => 'CGArne', + list => [qw( + 000000 8A3622 0C7E45 AA5C3D 2234D1 5C2E78 44AACC B5B5B5 + 5E606E EB8A60 6CD947 FFD93F 4C81FB E23D69 7BE2F9 FFFFFF + )], + parent => 'cga', + }, dawnbringer => { href => 'http://pixeljoint.com/forum/forum_posts.asp?TID=12795', title => "Dawnbringer's 16 color palette v1.0", @@ -219,6 +236,16 @@ use Shiar_Sheet::Colour '1.02'; ansiorder => [ 0,1,5,4,2,12,10,7 , 3,6,11,14,8,9,13,15 ], hueorder => [ 6,9,14,11,13,8,2,1 , 12,4,7,5,15,10,3,0 ], }, + solarized => { + href => 'http://ethanschoonover.com/solarized', + list => [qw( + 002b36:base03 073642:base02 586e75:base01 657b83:base00 + 839496:base0 93a1a1:base1 eee8d5:base2 fdf6e3:base3 + b58900:yellow cb4b16:orange dc322f:red d33682:magenta + 6c71c4:violet 268bd2:blue 2aa198:cyan 859900:green + )], + ansiorder => [ 1,10,15,8,13,11,14,6 , 0,9,2,3,4,12,5,7 ], + }, cpc => { name => 'Amstrad CPC', @@ -249,6 +276,34 @@ use Shiar_Sheet::Colour '1.02'; ], parent => 'cpc', }, + ppu => { + name => 'PPU (Famicom/NES)', + table => [ + do { + my @rgb = qw( + 333 555 777 777 + 014 036 357 567 + 006 027 447 657 + 326 407 637 757 + 403 507 707 747 + 503 704 737 755 + 510 700 740 764 + 420 630 750 770 + 320 430 660 773 + 120 140 360 572 + 031 040 070 473 + 000 053 000 276 + 022 044 077 467 + 111 222 444 666 + ); + map { [ + map { [ $_, map { $_ * 255 / 7 } split // ] } + map { $rgb[$_] } + $_*4 .. $_*4+3 + ] } 0..13 + } + ], + }, ansi88 => { name => 'rxvt 88 colour extension', rgbmap => [