emacs-devel
[Top][All Lists]
Advanced

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

Re: emacs, true color and iterm2


From: Eli Zaretskii
Subject: Re: emacs, true color and iterm2
Date: Tue, 10 Sep 2013 18:15:31 +0300

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden, address@hidden
> Date: Tue, 10 Sep 2013 10:57:31 -0400
> 
> >> > Tho, obviously, for 2bit color support, we won't will want to have
> >> ^                      ^^^^^
> >> 24                     [delete]
> >> 
> >> > support for tty colors without going through some approximation table.
> > Now I completely misunderstand what you mean by that, and why.
> 
> AFAIK, currently, color support in a tty goes through an approximation
> step which choose the closest color number to use among the N colors
> supported by the tty.

Only as fallback.  An exact match is tried first, and if it exists, it
is always used.

> We'll want to skip this step if the terminal supports 24bit colors,
> since the table would be both huge (16M entries) and useless.

You already assume that Someone(TM) will generate such a huge table.
But that's not guaranteed, and if I were the person to do the job, I'd
only make a list for the 256 standard colors.

In any case, the alist of supported colors is used not only for
approximating colors, but also for mapping color names and RGB values
to integer numbers that need to be sent to the terminal driver.  This
same alist is used to find the exact match, if it exists.  So you need
such an alist anyway, unless you want to invent a completely different
API for talking to a TTY.



reply via email to

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