all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: fxbois@gmail.com, emacs-devel@gnu.org
Subject: Re: emacs, true color and iterm2
Date: Tue, 10 Sep 2013 18:15:31 +0300	[thread overview]
Message-ID: <83hadsk8rw.fsf@gnu.org> (raw)
In-Reply-To: <jwvy5747ml2.fsf-monnier+emacs@gnu.org>

> From: Stefan Monnier <monnier@IRO.UMontreal.CA>
> Cc: fxbois@gmail.com, emacs-devel@gnu.org
> 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	other threads:[~2013-09-10 15:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09 17:54 emacs, true color and iterm2 Bois Francois-Xavier
2013-09-09 19:56 ` Eli Zaretskii
2013-09-09 23:12   ` Stefan Monnier
2013-09-10  2:07     ` Stefan Monnier
2013-09-10  2:51       ` Eli Zaretskii
2013-09-10 14:57         ` Stefan Monnier
2013-09-10 15:15           ` Eli Zaretskii [this message]
2013-09-10  2:49     ` Eli Zaretskii
2013-09-10 10:56 ` Richard Stallman
2013-09-10 11:26   ` Bois Francois-Xavier
2013-09-10 14:43     ` Andreas Schwab
2013-09-10 20:36     ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83hadsk8rw.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=fxbois@gmail.com \
    --cc=monnier@IRO.UMontreal.CA \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.