emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: face colors on 256 colors terminals


From: Dan Nicolaescu
Subject: Re: face colors on 256 colors terminals
Date: Thu, 07 Apr 2005 18:13:29 -0700

David Kastrup <address@hidden> writes:

  > Dan Nicolaescu <address@hidden> writes:
  > 
  > > David Kastrup <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]