unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Bill Wohler <wohler@newt.com>
Cc: emacs-devel@gnu.org
Subject: Re: Why min-colors 88?
Date: Sat, 04 Feb 2006 22:18:38 -0800	[thread overview]
Message-ID: <87wtgapbup.fsf@olgas.newt.com> (raw)
In-Reply-To: ud5i3nztf.fsf@gnu.org

Eli Zaretskii <eliz@gnu.org> writes:

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

Or in other words, Emacs' has 88 faces?

>> An MH-E developer has a device where (device-color-cells) returns 64.
>
> Out of curiosity, what device is that?

Eric?

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

Objectively, if the colors that we use do not map to the same color,
we should be OK, right? Subjectively, the MH-E colors should map to a
pleasing set.

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

Thanks, Eli.

-- 
Bill Wohler <wohler@newt.com>  http://www.newt.com/wohler/  GnuPG ID:610BD9AD
Maintainer of comp.mail.mh FAQ and MH-E. Vote Libertarian!
If you're passed on the right, you're in the wrong lane.



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

  reply	other threads:[~2006-02-05  6:18 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
2006-02-05  6:18   ` Bill Wohler [this message]
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=87wtgapbup.fsf@olgas.newt.com \
    --to=wohler@newt.com \
    --cc=emacs-devel@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).