X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/8b8c77dbf30f70a1e8ade679a62f08e130f959a2..d018b1fcc5e1035c2302b2417480003aca64fa5e:/termcol.plp diff --git a/termcol.plp b/termcol.plp index 446b9c5..c510cd2 100644 --- a/termcol.plp +++ b/termcol.plp @@ -1,111 +1,271 @@ -<: -use utf8; -use strict; -use warnings; -use open IO => ':utf8'; -use List::Util 'min'; +<(common.inc.plp)><: -our $VERSION = 'v1.0'; +Html({ + title => ($Request ? 'terminal colour' : 'colour palettes') . ' cheat sheet', + version => '1.2', + description => [!$Request ? "Comparison of various colour palettes." : ( + "Index of all terminal/console colour codes,", + "with an example result of various environments.", + )], + keywords => [qw' + color colour code terminal console escape table xterm rxvt + ansi vt100 8bit 4bit cga ega vga rgb hsv game emulator display + '], + data => ['termcol.inc.pl'], + stylesheet => [qw'light dark'], +}); -$header{content_type} = 'text/html; charset=utf-8'; +my @draw = map { [$_, s/\W+\z//] } grep { $_ } split m(/), + $get{img} // exists $get{img} && 'indi.png'; -:> - +my @termlist; +push @termlist, split /\W+/, $Request || 'default'; - -terminal colour cheat sheet - - - +say "

$_

\n" for $Request ? 'Colour palettes' : 'Terminal colours'; - -

Terminal colours

+say '

'; +if ("@termlist" eq 'default') { + say 'ANSI (VT100, ISO-6429) 16-colour text palette'; + say 'as implemented by various systems and programs.'; + say 'Also see 8-bit legacy hardware palettes.'; +} +elsif ("@termlist" eq 'legacy') { + say 'Colour palettes of various 8-bit legacy systems and retro games.'; + say 'Also see ANSI console palettes.'; +} +else { + say 'Comparison of requested colour palettes.'; +} +:> -

-
-

88-colour space

+coltable($_) for @termlist; +:> +