X-Git-Url: http://git.shiar.nl/sheet.git/blobdiff_plain/4f3782455010e83df98953a4fa4f146577b9a888..bcdcb872044a3146c38f3c17bb601130f170aff4:/termcol.plp diff --git a/termcol.plp b/termcol.plp index 850ff83..0000143 100644 --- a/termcol.plp +++ b/termcol.plp @@ -106,9 +106,11 @@ sub img_egapal { } || $@; } -for my $term (@termlist) { +sub coltable { + my ($term) = @_; my $info = $palettes->{$term}; ref $info eq 'HASH' or next; + my $caption = $info->{name} // $term; $caption = sprintf('<%s %s>%s', $info->{href} ? 'a' : 'span', @@ -134,6 +136,12 @@ for my $term (@termlist) { print ''; print colcell(@$_) for @$row; } + + my $width = scalar @{ $table->[0] }; + my @imgpal = map { [ @{$_}[1 .. 3] ] } map { @{$_} } @{$table}; + for (@draw) { + print "", img_egapal(\@imgpal, @{$_}); + } print "\n\n"; } @@ -244,6 +252,7 @@ sub coltable_hsv { return $out; } +coltable($_) for @termlist; :>