Subject: RE: bug#4033: 23.1; list-colors-display is misleading

From: "Drew Adams" <[email-masked]>
Date: Tue, 4 Aug 2009 12:40:32 -0700

> > > The RGB values listed at the right side are misleading.
> > 
> > Only if you interpret them to mean not what they were supposed to
> > mean.
> >
> > > The displayed RGB hex string ideally should reflect the 
> > > user's actual color possibilities.  If there is no way for
> > > Emacs to know that, then it's better to err on the side of
> > > providing more information: #RRRRGGGGBBBB, rather than less:
> > > #RRGGBB.  E.g., it's better to translate LightBlue as
> > > #befded5effff than as #beedff.
> 
> (I meant #ADADD8D8E6E6 and #ADD8E6 for LightBlue - got my 
> numbers wrong; sorry.)
> 
> > 16-bit RGB components is what Emacs uses internally, IIRC.  That is
> > the reason we show each one as two letters.
> 
> Is that right? Could you please check about this?
> 
> I was under the (perhaps mistaken) impression that Emacs treats colors
> differently, depending on your display's color support. In 
> particular, I thought
> that `display-color-cells' would show how many colors are 
> supported, and
> therefore how many RGB hex digits would be appropriate 
> (available) for a given
> display. IOW, I thought that on some displays you might be 
> able to use only
> #RRGGBB, while on others you could use #RRRGGGBBB (where 
> there would be a
> perceived difference when using fewer or more digits).
> 
> > I think this bug should be closed.
> 
> If you're sure about what you say, then yes. But please check 
> to be sure. Thx.

BTW, if what you say is the case, then it is all the more unfortunate, since
`color-values' returns values up to 65535 (or 65280, for some platforms). That's
16 ** 4, which means that each color component can be represented by up to 4 hex
digits: #RRRRGGGGBBBB. That's one reason I've always assumed that up to 4 hex
digits were handled by Emacs.

If what you say is true, then what is the reason for such a limitation? Is there
some inherent limitation, or is this just a design or implementation bug, which
could be fixed?