unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
Subject: Re: Why min-colors 88?
Date: Sat, 04 Feb 2006 13:11:40 +0200	[thread overview]
Message-ID: <ud5i3nztf.fsf@gnu.org> (raw)
In-Reply-To: <851.1138996246@olgas.newt.com> (message from Bill Wohler on Fri,  03 Feb 2006 11:50:46 -0800)

> Date: Fri, 03 Feb 2006 11:50:46 -0800
> From: Bill Wohler <wohler@newt.com>
> 
> Can anyone explain the magic number 88 to me? Why is this used throughout Emacs?
> Why is this the default generated when customizing a face (on devices
> with lots of colors)?

Because there's an 88-color xterm whose color set is rich enough to
support all the colors we use in Emacs' faces.

> I'd understand 16 (larger than the number of colors in the console and
> the number of names defined by W3C HTML 4.0), 216 ("web-safe" or 256-40
> colors reserved by the OS), and 256.

We found that 256/216 colors are indistinguishable from 88,
practically speaking.

> An MH-E developer has a device where (device-color-cells) returns 64.

Out of curiosity, what device is that?

In any case, there's no support in Emacs for such devices right now,
i.e. there's no 64-color set that can be used to map the face colors
using the tty-colors.el machinery.  So I wonder how does that
developer use his/her device with Emacs.

> What harm could there be in changing our specifications to use 64
> instead of 88?

I don't know.  To find out, someone will have to:

  . find out what colors, in terms of RGB values, are defined on that
    device
  . map the colors used by Emacs (e.g. in color-name-rgb-alist) into
    those 64 colors, using tty-color-translate
  . see how many Emacs colors map to the same color on the 64-color
    deives, and
  . draw the conclusions.

> Finally, why are there a lot of faces with seemingly redundant
> specifications such as this?
> 
>   (defface highlight
>     '((((class color) (min-colors 88) (background light))
>        :background "darkseagreen2")
>       (((class color) (min-colors 88) (background dark))
>        :background "darkolivegreen")
>       (((class color) (min-colors 16) (background light))
>        :background "darkseagreen2")
>       (((class color) (min-colors 16) (background dark))
>        :background "darkolivegreen")
>       (((class color) (min-colors 8))
>        :background "green" :foreground "black")
>       (t :inverse-video t))
>     "Basic face for highlighting."
>     :group 'basic-faces)

The main reason is to allow an easy modification of the defaults for
88-and-up color terminals in the future.  The 88-color support is new
with Emacs 22, so for now, we just duplicated the old definitions.  We
expect them to change as user experience is gained when Emacs 22 is
released.

  reply	other threads:[~2006-02-04 11:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-03 19:50 Why min-colors 88? Bill Wohler
2006-02-04 11:11 ` Eli Zaretskii [this message]
2006-02-05  6:18   ` Bill Wohler
2006-02-05 13:42     ` Stefan Monnier
2006-02-05 17:05       ` Bill Wohler
2006-02-05 18:49         ` Dan Nicolaescu
2006-02-05 22:31           ` Bill Wohler
2006-02-06  1:41             ` Miles Bader
2006-02-06  2:32         ` Stefan Monnier
2006-02-05 19:55     ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=ud5i3nztf.fsf@gnu.org \
    --to=eliz@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).