X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/0934eb163565512a7e1622f931a2f6a60b7c0872..54ea9d7c62215933a9b77f16b28717ea65a178ad:/termcol.plp diff --git a/termcol.plp b/termcol.plp index c7c74bf..73bf0d2 100644 --- a/termcol.plp +++ b/termcol.plp @@ -1,132 +1,210 @@ -<: -use utf8; -use strict; -use warnings; -use open IO => ':utf8'; -use List::Util 'min'; +<(common.inc.plp)><: -our $VERSION = 'v1.0'; +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'], +}); -$header{content_type} = 'text/html; charset=utf-8'; +my $imgfile = $get{img} // exists $get{img} && 'indi.png'; -:> - +my @termlist; +push @termlist, split /\W+/, $ENV{PATH_INFO} || 'default'; - -terminal colour cheat sheet - - - +my %termgroup = ( + default => [qw( ansi xkcd ansi88 )], + more => [qw( ansi legacy ansi256 )], + msx => [qw( msx1 msx2 arnejmp )], + ansi => [qw( cga xterm tango app html )], + legacy => [qw( c64 msx2 mac2 risc arnegame cpc )], +); +@{$_} = map { $termgroup{$_} ? @{ $termgroup{$_} } : $_ } @{$_} + for values %termgroup, \@termlist; - +:>

Terminal colours

- -
-

88-colour space

+sub coltable_hsv { + my ($dim, $rgbval, $greyramp) = @_; -
-

256-colour space

+:> +