On Wednesday, 14 September 2016 at 13:04:40 UTC, ketmar wrote:
in my editor i'm simply using rgb in [0..255] range, and
mapping that to what terminal has. yet it is probably not the
best way to make something nice looking when only 16 colors are
available. heh, i should try and see how it will look like! ;-)
actually, it's not that bad, i expected much worser results.
original 256 color mode:
http://ketmar.no-ip.org/img/tui/tui_c256.png
and this is restricted to basic 16 colors:
http://ketmar.no-ip.org/img/tui/tui_c16a.png
still readable. my terminal has somewhat non-standard first 16
colors (some colors are brighter than default xterm, some are
not), that's probably why background becomes so bright. but it is
still readable.
and this is 16 colors with "weighted translation"
(0.30*r+0.59*g+0.11*b). looks surprisingly clean:
http://ketmar.no-ip.org/img/tui/tui_c16b.png