X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/29ef1a8eeb2b3edf11164538f1d1470ec201f618..e476c3bfbcc78e9f667d83e9b35da5d55c7a6b42:/termcol.plp diff --git a/termcol.plp b/termcol.plp index 26a5c70..a090fc7 100644 --- a/termcol.plp +++ b/termcol.plp @@ -127,16 +127,13 @@ sub coltable { $caption, ) if $info->{href} or $info->{title}; - if (my $mapinfo = $info->{rgbmap}) { + if ($info->{table} or $info->{rgbmap}) { say ''; say sprintf '', $caption; - print coltable_hsv(@{$mapinfo}); - say "
%s
\n"; - } - if (my $table = $info->{table}) { - say ''; - say sprintf '', $caption; + print coltable_hsv(@{$_}) for $info->{rgbmap} || (); + + if (my $table = $info->{table}) { for my $row (@$table) { if (!$row) { say ''; @@ -155,6 +152,8 @@ sub coltable { print "
%s
", img_egapal(\@imgpal, @{$_}); } } + } + say "
\n"; }