emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Support 24-bit terminal colors.


From: Charles Strahan
Subject: Re: [PATCH] Support 24-bit terminal colors.
Date: Sun, 06 Nov 2016 19:12:06 -0500


On Mon, Sep 26, 2016, at 12:52 PM, Richard Stallman wrote:
> [[[ To any NSA and FBI agents reading my email: please consider    ]]]
> [[[ whether defending the US Constitution against all enemies,     ]]]
> [[[ foreign or domestic, requires you to follow Snowden's example. ]]]
> 
>   > This makes sense. It’s probably worthwhile to try to line up with
>   > some other very common terminal programs, to try to avoid splitting
>   > into any more standards. Bash, vim, screen, and tmux come to mind,
>   > but there are probably other good candidates as well.
> 
> That makes sense; then we could define an extension to terminfo.
> 
> Does anyone want to take charge of the project?
> 
> -- 
> Dr Richard Stallman
> President, Free Software Foundation (gnu.org, fsf.org)
> Internet Hall-of-Famer (internethalloffame.org)
> Skype: No way! See stallman.org/skype.html.


Rami proposed this solution
(https://lists.gnu.org/archive/html/bug-ncurses/2016-08/msg00035.html):

> 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.


For those more familiar with terminfo, how does that sound? If it seems
reasonable, I could fold that into Rami's patch (unless Rami would like
the honors).

If we do proceed along those lines, would we want to solely rely on that
extension to terminfo, or would we want to (for the time being) also
provide a hardcoded fallback?

Lemme know and I'll see if I can find some time to hack on it.


Thanks,

Charles Strahan



reply via email to

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