git.shiar.nl
/
sheet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
2eef54d
)
termcol: title overrides for html and xkcd
author
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 16 Jun 2010 19:27:38 +0000
(19:27 +0000)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Wed, 16 Jun 2010 19:29:48 +0000
(19:29 +0000)
termcol.plp
patch
|
blob
|
history
diff --git
a/termcol.plp
b/termcol.plp
index 1ea1a83353afefc1a9d00d5a2908585b0ac5a107..b018685f9794fc3207cc329821b8d938ad2a5da2 100644
(file)
--- a/
termcol.plp
+++ b/
termcol.plp
@@
-42,6
+42,10
@@
sub colcell {
my %col = (
-html => [
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
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
@@
-68,6
+72,10
@@
my %col = (
555753 EF2929 8AE234 FCE94F 729FCF AD7FA8 34E2E2 EEEEEC/,
],
-xkcd => [
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/,
],
qw/black maroon green olive navy purple teal silver
grey red lime yellow blue fuchsia cyan white/,
],
@@
-80,10
+88,10
@@
my %col = (
for my $term (qw/cga xterm tango html xkcd/) {
print '<table>', "\n";
for my $term (qw/cga xterm tango html xkcd/) {
print '<table>', "\n";
- print
"<caption>$term</caption>\n"
;
+ print
f "<caption>%s</caption>\n", $col{"-$term"}[0] || $term
;
for my $num (0 .. 15) {
my $rgb = $col{$term}[$num + 2];
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);
}
$name = [ $name, ['#333'] ] if $term eq 'xkcd';
print '<tr>', colcell($name, $rgb);
}