[Top][All Lists]
[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: |
Wed, 05 Jan 2005 07:38:28 +0200 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
>>> Also, users might want to find the color name corresponding to
>>> the known RGB value.
>
>> Is there any reasonably practical way to do that for an arbitrary RGB
>> triplet?
>
> A guess a function that returns the closest color-name would be good enough.
> What that's good for, I don't know.
There is already such a function: `tty-color-approximate' (currently
it works only for tty colors). I don't know how it is useful from the
user's POV. What I intended with adding #RRGGBB values was to make it
easier for users getting somewhere a #RRGGBB value to see if there is
a corresponding easily rememberable color name.
With #RRGGBB values printed in the *Colors* buffer it would be possible
to find closer color names even without a function, simply with a regexp
isearch like M-C-s #f.[fe].e. It will not find the closest color name,
but it is good enough to help to find all closer colors.
Even better would be if the *Colors* buffer was sorted by RGB values.
I don't suggest to do that by default, but different sorting order would
be useful, e.g. by color name, by color intensity. The latter is good
for finding a darker or brighter color than a given color, but it is not
so obvious since there are too many variants of projecting a color value
from 3-D color space into a 1-D color list. Perhaps the most useful is
sorting by hue into a rainbow, and inside every hue sorting by value*saturation.
>>> gray grey bebebe
>>> light gray light grey, LightGray, LightGrey d3d3d3
>
>> First, if we do that, I'd suggest to use #BE12BE34BE56, i.e. prefix
>> with # and use 4 digits per color.
>
> I agree on the `#'.
I omitted the `#' to save more space. But OK, one character is not
too much to remind the users about the proper format.
--
Juri Linkov
http://www.jurta.org/emacs/
Re: list-colors-display: display all color names, Juri Linkov, 2005/01/05
Re: list-colors-display: display all color names, Eli Zaretskii, 2005/01/05
RE: list-colors-display: display all color names, Drew Adams, 2005/01/05
Re: list-colors-display: display all color names, Eli Zaretskii, 2005/01/06