my %col = (
-html => [
+ sprintf('<a title="%s" href="%s">html</a>',
+ 'HTML keywords (inherited by CSSā„2.1 and SVG), mostly identical to X11',
+ 'http://www.w3.org/TR/css3-color/#html4',
+ ),
qw/black maroon green olive navy purple cyan silver
gray red lime yellow blue fuchsia aqua white/,
qw/reset bold dim italic underline blink fastblink
555753 EF2929 8AE234 FCE94F 729FCF AD7FA8 34E2E2 EEEEEC/,
],
-xkcd => [
+ sprintf('<a title="%s" href="%s">xkcd</a>',
+ 'human averages in xkcd survey results',
+ 'http://blog.xkcd.com/2010/05/03/color-survey-results/',
+ ),
qw/black maroon green olive navy purple teal silver
grey red lime yellow blue fuchsia cyan white/,
],
for my $term (qw/cga xterm tango html xkcd/) {
print '<table>', "\n";
- print "<caption>$term</caption>\n";
+ printf "<caption>%s</caption>\n", $col{"-$term"}[0] || $term;
for my $num (0 .. 15) {
my $rgb = $col{$term}[$num + 2];
- my $name = $col{"-$term"}[$num] || $num;
+ my $name = $col{"-$term"}[$num + 1] || $num;
$name = [ $name, ['#333'] ] if $term eq 'xkcd';
print '<tr>', colcell($name, $rgb);
}