From c32011016e046e39ac53f81303c9f3b95b0e9c89 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 9 May 2009 01:24:15 +0000 Subject: [PATCH] termcol: page to list unix terminal colours --- termcol.plp | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 termcol.plp diff --git a/termcol.plp b/termcol.plp new file mode 100644 index 0000000..3dd1d1b --- /dev/null +++ b/termcol.plp @@ -0,0 +1,61 @@ +<: +use utf8; +use strict; +use warnings; +use open IO => ':utf8'; + +our $VERSION = 'v1.0'; + +$header{content_type} = 'text/html; charset=utf-8'; + +:> + + + +terminal colour cheat sheet + + + + + +

Terminal colours

+ + + +<: +my %col = ( + -name => [ + qw/black red green orange blue magenta cyan gray + gray red green yellow blue magenta cyan white/, + qw/reset bold dim italic underline blink fastblink + reverse hidden/, + ], + linux => [ + qw/000 CCC/, + qw/000 A00 0A0 A50 00A A0A 0AA AAA + 555 F55 5F5 FF5 55F F5F 5FF FFF/, + ], + xterm => [ + qw/000 CCC/, + qw/000 C00 0C0 CC0 4682B4 C0C 0CC E5E5E5 + 4C4C4C F00 0F0 FF0 1E90FF F0F 0FF FFF/, + ], + tango => [ + qw/000 CCC/, + qw/2E3436 CC0000 4E9A06 C4A000 3465A4 75507B 06989A D3D7CF + 555753 EF2929 8AE234 FCE94F 729FCF AD7FA8 34E2E2 EEEEEC/, + ], +); + +for my $num (0 .. 15) { + printf(''."\n", + $num, + $col{-name}[$num], + join('', map {sprintf '
#xterm
%d%s%s
 â–ª ', + 'background:#'.$col{$_}[0].'; color:#'.$col{$_}[$num + 2], + } qw/linux xterm tango/ ), + ); +} +:>
+ -- 2.30.0