-my @termlist = qw(html cga xterm tango);
-print '<tr>', (map {'<th colspan="3">'.$_} @termlist), "</tr>\n";
-for my $num (0 .. 15) {
- printf('<tr>%s</tr>'."\n",
- join('', map {
- my $rgb = $col{$_}[$num + 2];
- colcell($_ eq 'html' ? $col{-name}[$num] : $num, $rgb, $col{$_}[0])
- } @termlist ),
- );
+for my $term (qw/html cga xterm tango/) {
+ print '<table>', "\n";
+ print "<caption>$term</caption>\n";
+ for my $num (0 .. 15) {
+ my $rgb = $col{$term}[$num + 2];
+ print '<tr>',
+ colcell($col{"-$term"}[$num] || $num, $rgb, $col{$term}[0]);
+ }
+ print "</table>\n\n";
+}
+:></div>
+
+<hr>
+
+<div class="section">
+<h2>88-colour space</h2>
+<:
+for my $r (0 .. 3) {
+ print '<table>';
+ for my $g (0 .. 3) {
+ print '<tr>';
+ for my $b (0 .. 3) {
+ my $index = $r*4*4 + $g*4 + $b + 16;
+ print colcell($index, map {(0, 139, 205, 255)[$_]} $r, $g, $b);
+ }
+ }
+ print "</table>\n";