termcol: fix reordered msx transparency exception
authorMischa POSLAWSKY <perl@shiar.org>
Wed, 3 May 2017 21:46:34 +0000 (23:46 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Mon, 29 May 2017 17:23:12 +0000 (19:23 +0200)
termcol.plp

index 6d69f0c1b798f33328951f5bef3cf754f40e91b5..8e61fe049516075e8df0b531cdadfe651ea708c7 100644 (file)
@@ -175,7 +175,7 @@ sub coltable {
                                my $num = $row + $col * $rows;
                                my ($rgb, $name) = split /:/, $colours->[$num], 3;
                                $name //= $rgb && $num;
                                my $num = $row + $col * $rows;
                                my ($rgb, $name) = split /:/, $colours->[$num], 3;
                                $name //= $rgb && $num;
-                               $name = [ $name, [] ] if $term =~ /^msx/ and !$num;
+                               $name = [ $name, [] ] if $term =~ /^msx/ and !$name;  # no bg for transparency
                                $name = [ $name, ['#333'] ] if $term eq 'xkcd';
                                print colcell($name, $rgb);
                        }
                                $name = [ $name, ['#333'] ] if $term eq 'xkcd';
                                print colcell($name, $rgb);
                        }