nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] about support for more than 16 colors


From: Benno Schulenberg
Subject: Re: [Nano-devel] about support for more than 16 colors
Date: Sat, 6 Jan 2018 17:53:29 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0


Op 04-01-18 om 01:14 schreef Brand Huntsman:
As for 24-bit color, does ncurses even support it: http://invisible-island.net/ncurses/ncurses.faq.html#xterm_16MegaColors .

Apparently it doesn't.  "Using the ncurses 6 ABI, you have 256 colors, or 32767
pairs (the limit for a signed 16-bit number). That limit is good enough for
realistic applications, which could not have that many character cells on a
screen simultaneously".

But... how many colors would we realistically need for syntax highlighting?
How many could be simultaneously used before the display turns into chaos?
Fifteen?  Twenty?  And how many colors can people clearly and without error
distinguish when they are several words or several lines apart?  And how many
syntactic categories would people want to distinguish?  Twenty?  Thirty?  In
the current syntax files, it aren't more than ten, at most fifteen.

So... I think that the 256 colors (or rather the 228, when not counting the
the grey-scale stuff) are more than enough to: a) color all discernible
categories differently, and b) to allow tweaking for creating "harmonious"
color schemes, for esthetics.

Nano could still use 24-bit color in syntaxes but would always need to map it to a palette index.

That would be good, because from a #RRGGBB number one can still in some
way deduce what kind of color it is.  From a palette index, no way.

   https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit

Benno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]