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: face colors on 256 colors terminals Date: Wed, 06 Apr 2005 20:46:10 +0300 Message-ID: <01c53ad0$Blat.v2.4$aa0fd4e0@zahav.net.il> References: <200504060817.j368HDAH019106@scanner2.ics.uci.edu> <01c53acd$Blat.v2.4$7c0f2080@zahav.net.il> Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT X-Trace: sea.gmane.org 1112810086 3639 80.91.229.2 (6 Apr 2005 17:54:46 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 6 Apr 2005 17:54:46 +0000 (UTC) Cc: dann@ics.uci.edu, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 06 19:54:43 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DJEia-0007bM-4h for ged-emacs-devel@m.gmane.org; Wed, 06 Apr 2005 19:53:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DJEHi-0000Qu-VP for ged-emacs-devel@m.gmane.org; Wed, 06 Apr 2005 13:25:46 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DJEFl-0007gS-Fm for emacs-devel@gnu.org; Wed, 06 Apr 2005 13:23:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DJEFl-0007ey-7J for emacs-devel@gnu.org; Wed, 06 Apr 2005 13:23:45 -0400 Original-Received: from [192.114.186.24] (helo=legolas.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DJEgJ-00067a-Ri; Wed, 06 Apr 2005 13:51:12 -0400 Original-Received: from zaretski (IGLD-80-230-67-97.inter.net.il [80.230.67.97]) by legolas.inter.net.il (MOS 3.5.6-GR) with ESMTP id ECC07989 (AUTH halo1); Wed, 6 Apr 2005 20:50:41 +0300 (IDT) Original-To: David Kastrup X-Mailer: emacs 22.0.50 (via feedmail 8 I) and Blat ver 2.4 In-reply-to: (message from David Kastrup on Wed, 06 Apr 2005 19:36:27 +0200) 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:35646 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35646 > Cc: Dan Nicolaescu , emacs-devel@gnu.org > From: David Kastrup > Date: Wed, 06 Apr 2005 19:36:27 +0200 > > > The R, G, and B represent single hexadecimal digits. When > > fewer than 16 bits each are specified, they represent the > > most-significant bits of the value (unlike the "rgb:" syn- > > tax, in which values are scaled). For example, #3a7 is > > the same as #3000a0007000. > > > > So I think the code in tty-colors.el is correct in this matter. It > > is, however, possible that the RGB values in color-name-rgb-alist were > > incorrectly scaled from 8-bit variants, and need to be amended. > > Actually, it does not make sense to scale in that way. #3a7 really > should be the same as #3333aaaa7777, so that #fff is the same as > #ffffffffffff, pure white. That could be so, but: (1) The #RRGGBB syntax being a legacy thingy, I don't believe anyone will want to change it; and (2) As long as X does it this way, so must we, because when Emacs runs on X, the #RRGGBB spec is parsed by the X server, not by Emacs (Emacs just hands the spec to X). If tty-colors.el doesn't do _exactly_ the same, a color specified by the same #RRGGBB will look differently in an xterm and on X.