From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Diff mode faces Date: Sat, 02 Jul 2005 02:59:19 +0300 Organization: JURTA Message-ID: <87acl6aw9w.fsf@jurta.org> References: <87oea5urwm.fsf@jurta.org> <87psujj0h0.fsf@jurta.org> <86hdfv1y9b.fsf@blue.stonehenge.com> <87r7eyqzcy.fsf@jurta.org> <200506191710.j5JHAEN11479@raven.dms.auburn.edu> <877jgfi40l.fsf@jurta.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1120274770 24618 80.91.229.2 (2 Jul 2005 03:26:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 2 Jul 2005 03:26:10 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 02 05:26:07 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DoYdR-0001BB-FT for ged-emacs-devel@m.gmane.org; Sat, 02 Jul 2005 05:25:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DoYm1-00059G-3y for ged-emacs-devel@m.gmane.org; Fri, 01 Jul 2005 23:34:33 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DoYgc-0002XE-1x for emacs-devel@gnu.org; Fri, 01 Jul 2005 23:28:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DoYgL-0002Mv-Oc for emacs-devel@gnu.org; Fri, 01 Jul 2005 23:28:46 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DoYgH-0002Mc-Bl for emacs-devel@gnu.org; Fri, 01 Jul 2005 23:28:37 -0400 Original-Received: from [194.126.101.98] (helo=mail.neti.ee) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DoYNv-0003CK-2d; Fri, 01 Jul 2005 23:09:39 -0400 Original-Received: from mail.neti.ee (80-235-37-19-dsl.mus.estpak.ee [80.235.37.19]) by Relayhost2.neti.ee (Postfix) with ESMTP id 931AB1E3F; Sat, 2 Jul 2005 06:04:11 +0300 (EEST) Original-To: Eli Zaretskii In-Reply-To: (Eli Zaretskii's message of "Fri, 01 Jul 2005 12:13:04 +0200") User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) X-Virus-Scanned: by amavisd-new-2.2.1 (20041222) (Debian) at neti.ee 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:40078 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40078 >> On TTY it classifies colors as follows: >> >> Dark: black red green blue >> Light: magenta yellow cyan white >> >> But on xterm it is quite different: >> >> Dark: black red green blue magenta yellow cyan >> Light: white >> >> That anomaly could be worth fixing. > > I think that's not an anomaly, but a bug. > > Juri, can you explain how did this happen? If that's an 8-color > xterm, then the code in tty-color-values should not distinguish > between xterm and any other 8-color TTY. If the xterm in question > supports more than 8 colors, please tell the details, including how > many colors it supports, how were the colors set up, and how did you > test the above classification. It is 8-color xterm, and according to color mapping `xterm-standard-colors' in term/xterm.el `yellow' has color values of `yellow3' (52685 52685 0), `cyan' - values of `cyan3' (0 52685 52685), and so on. Many colors on xterm have values darker than the colors with the same names in the RGB table. But on TTY, color values are the same as on X, so `yellow' is (65535 65535 0), `cyan' is (0 65535 65535). (Even `yellow3' has the same color value as `yellow' (65535 65535 0), but this probably doesn't matter on TTY). > A formula that classifies red and magenta the same on X and on a TTY > is probably not very good, since the TTY's "red" is much darker that > the X's "red". See the WARNING in the comments near the beginning of > tty-colors.el, for more about this. xterm's `red' (which actually has the values of `red3') is darker than the X's `red', but both `red' and `red3' are classified as dark colors on TTY, xterm and X, so there is no problem with it. The situation is different for `yellow3' and `cyan3'. `yellow3' is classified as a dark color, but it really looks like a light color. White on yellow3 is still not readable, since this is a light-foreground/light-background combination. My formula puts `yellow3' and `cyan3' into the light category. -- Juri Linkov http://www.jurta.org/emacs/