bug-gnu-emacs
[Top][All Lists]
Advanced

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

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


From: Drew Adams
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.






reply via email to

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