Avoid load unless needed.
ansi => [qw( cga putty xterm tango app html cgarne )],
legacy => [qw( c64 msx mac2 risc arnegame dawnbringer cpc cpcboy shiar32 ppu 64 )],
+ xcolors => sub {
+ my $pals = do 'termcol-xcolor.inc.pl' or die $! || $@;
+ $_[0]->{$_} = $pals->{$_} for keys %{$pals};
+ return 'xcolor';
+ },
+
html => {
title => 'HTML keywords (inherited by CSSā„2.1 and SVG), mostly identical to X11',
href => 'http://www.w3.org/TR/css3-color/#html4',
my $palettes = do 'termcol.inc.pl';
die "Cannot open palette data: $_\n" for $@ || $! || ();
-my $more = do 'termcol-xcolor.inc.pl' || {};
-$palettes = {%$palettes, %$more};
sub colcell {
my $name = shift // return "<td>\n";
if (ref $info eq 'ARRAY') {
coltable($_) for @{$info};
+ return;
+ }
+
+ if (ref $info eq 'CODE') {
+ coltable($_) for $info->($palettes);
+ return;
}
ref $info eq 'HASH' or return;