emacs-devel
[Top][All Lists]
Advanced

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

Re: list-colors-display: display all color names


From: Juri Linkov
Subject: Re: list-colors-display: display all color names
Date: Thu, 06 Jan 2005 12:44:44 +0200
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

Miles Bader <address@hidden> writes:
>> > What's impractical about it?  You can compute 12 hex digits as
>> > practically as you can 3 or 6.
>> 
>> Impractical because the most widespread format is #RRGGBB which
>> compactly encodes any of 16-million colors.
>
> The 6-digit version is a good default, but that doesn't mean that the
> code shouldn't optionally generate other formats when necessary (when
> the actual RGB values dictate).

Yes, longest formats should be generated for colors really encoded
by more than 24 bits.  Is it possible to tell this from the color
value returned by `color-values'?  I noticed that for all 24-bit
colors the 8-bit part in the 16-bit color component value returned
by `color-values' is always duplicated in its highest and lowest
8-bit part, e.g. #121234345656.  Maybe this fact dictates that
the color is 24-bit and can be represented by the shorter format
#123456?

> [I have no idea why you used the word "impractical", it doesn't seem
> to make any sense in this context -- something is impractical if
> it's too expensive to be justified by the benefits, but as was
> pointed out, it's not at all expensive to generate other formats,
> though the benefits may be slight.]

It's expensive in the sense that #RRRRGGGGBBBB consumes more space
than #RRGGBB in the *Colors* buffer, so it can cause long lines
truncated at the right window edge.

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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