- if (my $table = $info->{table}) {
- say '<table class="color mapped">';
- say sprintf '<caption>%s</caption>', $caption;
- for my $row (@$table) {
- if (!$row) {
- say '<tbody>';
- next;
+ print coltable_hsv(@{$_}) for $info->{rgbmap} || ();
+
+ if (my $table = $info->{table}) {
+ $table = [ @{$table}[@{$reorder}] ] if $reorder;
+
+ for my $row (@$table) {
+ if (!$row) {
+ say '<tbody>';
+ next;
+ }
+ print '<tr>';
+ print colcell(ref $_ ? @$_ : $_ ? reverse split /:/ : undef) for @$row;