From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Why min-colors 88? Date: Sat, 04 Feb 2006 13:11:40 +0200 Message-ID: References: <851.1138996246@olgas.newt.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1139104820 876 80.91.229.2 (5 Feb 2006 02:00:20 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 5 Feb 2006 02:00:20 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 05 03:00:17 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F5ZCJ-0006eB-Pz for ged-emacs-devel@m.gmane.org; Sun, 05 Feb 2006 03:00:16 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F5ZFX-00008Z-Lz for ged-emacs-devel@m.gmane.org; Sat, 04 Feb 2006 21:03:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1F5Wjv-0005OC-40 for emacs-devel@gnu.org; Sat, 04 Feb 2006 18:22:47 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1F5WVI-0001Mr-Ss for emacs-devel@gnu.org; Sat, 04 Feb 2006 18:07:41 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1F5Uaa-0005Is-If for emacs-devel@gnu.org; Sat, 04 Feb 2006 16:05:00 -0500 Original-Received: from [192.114.186.17] (helo=gandalf.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.52) id 1F5LMk-0004wT-H5 for emacs-devel@gnu.org; Sat, 04 Feb 2006 06:14:06 -0500 Original-Received: from nitzan.inter.net.il (nitzan.inter.net.il [192.114.186.20]) by gandalf.inter.net.il (MOS 3.7.1-GA) with ESMTP id HTS04588; Sat, 4 Feb 2006 13:11:34 +0200 (IST) Original-Received: from HOME-C4E4A596F7 (IGLD-83-130-205-46.inter.net.il [83.130.205.46]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id CPY40475 (AUTH halo1); Sat, 4 Feb 2006 13:11:33 +0200 (IST) Original-To: emacs-devel@gnu.org In-reply-to: <851.1138996246@olgas.newt.com> (message from Bill Wohler on Fri, 03 Feb 2006 11:50:46 -0800) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:50018 Archived-At: > Date: Fri, 03 Feb 2006 11:50:46 -0800 > From: Bill Wohler > > 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.