GNU bug report logs - #4033
23.1; list-colors-display is misleading

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Tue, 4 Aug 2009 16:10:07 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Drew Adams" <drew.adams <at> oracle.com>
To: "'Eli Zaretskii'" <eliz <at> gnu.org>
Cc: <4033 <at> debbugs.gnu.org>
Subject: bug#4033: 23.1; list-colors-display is misleading
Date: Tue, 4 Aug 2009 12:58:59 -0700
> > 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.
> 
> Maybe it's too late and my brain is already asleep, but isn't 65535
> 2^16-1, i.e. the largest 16-bit number?

I might be asleep too, though it's not late here. ;-)

Yes, 65535 is 2^16 - 1. And it is also 16^4 - 1.

16^4 means four hex digits. FFFF is 65535.

So if we have color values from 0 to 65535 inclusive, then we ought to be able
to treat hex codes from 0000 to FFFF also. Four hex digits for each color
component: R, G, and B.




This bug report was last modified 15 years and 352 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.