X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/dae21a09b01baa118720670247a87c5cdc2591b8..305b277a4f33d11dce040fa2a9a1395000f50d27:/termcol.plp diff --git a/termcol.plp b/termcol.plp index 359b33d..60afba6 100644 --- a/termcol.plp +++ b/termcol.plp @@ -1,149 +1,307 @@ -<: -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'; - -:> - +<(common.inc.plp)><: - -terminal colour cheat sheet - - - +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 + '], + stylesheet => [qw'light dark'], +}); - +:>

Terminal colours

- -
-

88-colour space

+
+

88-colour space

+<: +print coltable_hsv(4, + sub {(0, 139, 205, 255)[$_[0]]}, + [map { ($_ + 2 + ($_>0)) * 255/11 } 0 .. 7], +); +:>
+<: if ($ENV{PATH_INFO} =~ /256/) { :>
-

256-colour space

+print coltable_hsv(6, + sub { $_[0] && $_[0]*40 + 55 }, + [ map { $_ * 10 + 8 } 0 .. 23 ], +); +:> +<: } :>
- - -