X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/e98b059d1f6bbd6ac8ca06de152959536e4b98b0..ff84da253ec62aa4a552d8b98aae013b0c7ea5f8:/termcol.plp diff --git a/termcol.plp b/termcol.plp index 889a55c..44ee75b 100644 --- a/termcol.plp +++ b/termcol.plp @@ -1,147 +1,204 @@ -<: -use utf8; -use strict; -use warnings; -use open IO => ':utf8'; -use List::Util 'min'; - -our $VERSION = 'v1.0'; - -$header{content_type} = 'text/html; charset=utf-8'; - -:> - - - -terminal colour cheat sheet - - - - - +<(common.inc.plp)><: + +Html({ + title => 'terminal colour cheat sheet', + version => '1.0', + description => [ + "Index of all terminal/console colour codes,", + "with an example result of various environments.", + ], + keywords => [qw' + color code terminal console escape table xterm rxvt + '], + data => ['termcol.inc.pl'], + stylesheet => [qw'light dark'], +}); + +:>

Terminal colours

- -
-

88-colour space

+if (exists $get{v}) { + print "\n"; + print "\n"; + print coltable_hsv(3, sub { + $_[2] + 3 * ($_[0] + 3 * $_[1]), + map { $_ && $_ * 127 + 1 } @_ + }); + print "
Amstrad CPC
\n\n"; +} +:>
-

256-colour space

+if ($ENV{PATH_INFO} =~ /256/) { + print "

256-colour space

\n"; + print "\n"; + print coltable_hsv(6, + sub { + $_[2] + 6 * ($_[1] + 6 * $_[0]) + 16, + map { $_ && $_*40 + 55 } @_ + }, + [ map { $_ * 10 + 8 } 0 .. 23 ], + ); + print "
\n"; +} +:>
- - -