extended palettes for 88-256 color terminals
authorMischa POSLAWSKY <perl@shiar.org>
Mon, 23 Sep 2019 16:27:00 +0000 (18:27 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Tue, 24 Sep 2019 00:08:51 +0000 (02:08 +0200)
Preset options for 88-color urxvt or 256-color xterm ea:
instead of 3 shades of whites, offers 12 in ramp88 and 23 in greys;
similarly increases 7 values of fire to 11 for fire88 and 17 for fire256.

barcat

diff --git a/barcat b/barcat
index ad6ccab98ffdaf7ad0eaab230979ff1fbbecff05..2acdaddfca5c4cf232a67cb35375742fcfaddea4 100755 (executable)
--- a/barcat
+++ b/barcat
@@ -55,8 +55,19 @@ GetOptions(\%opt,
        'palette=s' => sub {
                $opt{palette} = {
                        fire   => [qw( 90 31 91 33 93 97 96 )],
+                       fire88 => [map {"38;5;$_"} qw(
+                               80  32 48 64  68 72 76  77 78 79  47
+                       )],
+                       fire256=> [map {"38;5;$_"} qw(
+                               235  52 88 124 160 196
+                               202 208 214 220 226  227 228 229 230 231  159
+                       )],
+                       ramp88 => [map {"38;5;$_"} qw(
+                               64 65 66 67 51 35 39 23 22 26 25 28
+                       )],
                        whites => [qw( 1;30 0;37 1;37 )],
-               }->{$_[1]} // [ split /\s/, $_[1] ];
+                       greys  => [map {"38;5;$_"} 52, 235..255, 47],
+               }->{$_[1]} // [ split /[^0-9;]/, $_[1] ];
        },
        'stat|s!',
        'signal-stat=s',