[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Diff mode faces
Re: Diff mode faces
Sat, 02 Jul 2005 02:59:19 +0300
Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)
>> 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
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
My formula puts `yellow3' and `cyan3' into the light category.