termcol: reference xterm for 256 colour title, rxvt for 88
[sheet.git] / termcol.inc.pl
index 6c6f68cea57a90abdc22a7905ce00062408ecc4e..48b140ce0eee3a8ee110a95eaea7f1708fe30c5b 100644 (file)
@@ -158,4 +158,36 @@ use Shiar_Sheet::Colour '1.02';
                        1B2632::night    005784::sea     31A2F2::sky     B2DCEF::cloud
                )],
        },
+
+       cpc => {
+               name => 'Amstrad CPC',
+               rgbmap => [
+                       3 => sub {
+                               $_[2] + 3 * ($_[0] + 3 * $_[1]),
+                               map { $_ && $_ * 127 + 1 } @_
+                       },
+               ],
+       },
+       ansi88 => {
+               name => 'rxvt 88 colour extension',
+               rgbmap => [
+                       4 => sub {
+                               $_[2] + 4 * ($_[1] + 4 * $_[0]) + 16,
+                               map { (0, 139, 205, 255)[$_] } @_
+                       },
+                       [ map { ($_ + 2 + ($_>0)) * 255/11 } 0 .. 7 ],
+               ],
+       },
+       ansi256 => {
+               name => 'xterm 256 colour extension',
+               href => 'http://web.archive.org/web/20130125000058/http://www.frexx.de/xterm-256-notes/',
+               # \033[38;5;${FG}m
+               rgbmap => [
+                       6 => sub {
+                               $_[2] + 6 * ($_[1] + 6 * $_[0]) + 16,
+                               map { $_ && $_*40 + 55 } @_
+                       },
+                       [ map { $_ * 10 + 8 } 0 .. 23 ],
+               ],
+       },
 }