From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: face colors on 256 colors terminals Date: Thu, 07 Apr 2005 18:13:29 -0700 Message-ID: <200504080113.j381DVAH023478@scanner2.ics.uci.edu> References: <200504060817.j368HDAH019106@scanner2.ics.uci.edu> <01c53acd$Blat.v2.4$7c0f2080@zahav.net.il> <200504061752.j36HqSAH012245@scanner2.ics.uci.edu> <01c53aea$Blat.v2.4$16ee4740@zahav.net.il> <200504062350.j36NoAAH028834@scanner2.ics.uci.edu> <200504070514.j375EBAH009933@scanner2.ics.uci.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1112922927 25210 80.91.229.2 (8 Apr 2005 01:15:27 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 8 Apr 2005 01:15:27 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Apr 08 03:15:21 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DJi5N-0007FT-UV for ged-emacs-devel@m.gmane.org; Fri, 08 Apr 2005 03:15:02 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DJhen-0007x8-9k for ged-emacs-devel@m.gmane.org; Thu, 07 Apr 2005 20:47:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DJhdD-0007Lf-6N for emacs-devel@gnu.org; Thu, 07 Apr 2005 20:45:55 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DJhd5-0007GP-6Y for emacs-devel@gnu.org; Thu, 07 Apr 2005 20:45:47 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DJhcz-00079p-Bf for emacs-devel@gnu.org; Thu, 07 Apr 2005 20:45:41 -0400 Original-Received: from [128.195.1.36] (helo=scanner2.ics.uci.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DJi6a-00027q-8K; Thu, 07 Apr 2005 21:16:16 -0400 Original-Received: from vino.ics.uci.edu (dann@vino.ics.uci.edu [128.195.11.198]) by scanner2.ics.uci.edu (8.12.10/8.12.10) with ESMTP id j381DVAH023478; Thu, 7 Apr 2005 18:13:31 -0700 (PDT) Original-To: David Kastrup In-Reply-To: (David Kastrup's message of "Thu, 07 Apr 2005 12:23:10 +0200") Original-Lines: 51 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=-99.4, required 5, J_CHICKENPOX_52, USER_IN_WHITELIST) 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:35721 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:35721 David Kastrup writes: > Dan Nicolaescu writes: > > > David Kastrup writes: > > > > > I am certain I am missing the context, but is this really > > > related to the #RRGGBB notation in any manner? It really looks > > > awful to me if white gets defined as #ff00ff00ff00, so I'd like > > > to be as bothersome as to be grateful for some factual > > > reassurance that we are indeed catering here for a real instead > > > of a perceived problem, and that the fix in that manner is the > > > right thing to do. > > > > Well, there patch has 3 parts. > > > > Part1: > > The patch to xterm-register-default-colors changes the way the 8bit > > R/G/B values are computed for a 256 color xterm to match what the > > xterm currently does. This part should be correct and > > non-controversial. > > Ok. > > > Part2: > > xterm-rgb-convert-to-16bit converts an 8bit color value (say Y) to a 16bit > > color. As we discussed, the result can either be Y0 or YY. > > My empirical testing show that there's no visible difference between > > the two. > > If by "visible" you mean "undiscernible by the unadorned eye as long > as no gamma correction is applied", sure. If by "visible" you mean > "undiscernible by the computer so that the heuristic-mask image > property has a chance of working with an explicit color", we are > talking something entirely different here. > > man Xcolor: [snip] Actually the color values in xterm.el and tty-colors.el are not used this way at all. The xterm can only display a fixed set of 256 colors. The 16bit values are just used for finding which of the 256 colors the xterm can display should be used for a color name that appears in rgb.txt (or a color given as R G B components). My empirical testing was to display all the colors in rgb.txt in an emacs buffer and see if they are displayed the same when using the Y0 or YY mapping. They seemed to be. Of course this is not a formal proof... --dan