termcol: include and mark duplicate colours in ppu
authorMischa POSLAWSKY <perl@shiar.org>
Tue, 2 May 2017 19:56:01 +0000 (21:56 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 29 May 2017 17:23:11 +0000 (19:23 +0200)
termcol.inc.pl

index 6e3b6d6..3242775 100644 (file)
@@ -310,12 +310,13 @@ use Shiar_Sheet::Colour 1.05;
                                        320 430 660 773
                                        120 140 360 572
                                        031 040 070 473
-                                       000 053 000 276
+                                       040 053 276 276
                                        022 044 077 467
                                        111 222 444 666
                                );
+                               my %dup;
                                map { [
-                                       map { [ $_, map { $_ * 255 / 7 } split // ] }
+                                       map { [ $dup{$_}++ ? "<s>$_</s>" : $_, map { $_ * 255 / 7 } split // ] }
                                        map { $rgb[$_] }
                                        $_*4 .. $_*4+3
                                ] } 0..13