bug-ncurses
[Top][All Lists]
Advanced

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

Support 24-bit terminals


From: Rami Ylimäki
Subject: Support 24-bit terminals
Date: Wed, 31 Aug 2016 18:40:47 +0300

Hi,

According to [1], 24-bit terminals have become a de facto standard. However, it seems that 24-bit terminals can't advertise this capability easily.

I suggest that terminfo database is extended with a generic xterm-24bit entry, which has all the capabilities of xterm-256color and two capabilities for changing non-indexed colors:

setrgbf=\E[38;2;%p1%d;%p2%d;%p3%dm
setrgbb=\E[48;2;%p1%d;%p2%d;%p3%dm

Pretty much all 24-bit terminals listed in [1] support three rgb values separated by semicolons.

The parameter range could be implicitly 0-255. Alternatively a separate capability could be created to tell how many shades each rgb component supports:

setrgbn#256

I know that this has been previously discussed in [2], but I think the biggest problem in that discussion was trying to preserve compability with indexed color modes. I think that the non-indexed capabilities setrgbf, setrgbb and setrgbn should be completely separate from indexed capabilities colors, setab and setaf.

[1] https://gist.github.com/XVilka/8346728
[2] https://lists.gnu.org/archive/html/bug-ncurses/2013-10/msg00007.html


reply via email to

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