Re: Retrieving color names and hex values using list-colors-display for coding purposes

packrat386 <[email protected]> Thu, 16 Jul 2026 15:46:24 +0000
Newsgroups gmane.emacs.help
Message-ID <875x2f9bud.fsf@fg-ct>
"Heime" <[email protected]> writes:

> On Thursday, July 16th, 2026 at 5:42 PM, Eli Zaretskii <[email protected]> wro=
te:
>
>> > Date: Thu, 16 Jul 2026 02:56:34 +0000
>> > From: Heime <[email protected]>
>> >
>> >
>> > How can I get list of colour names and hex numbers (list-colors-displa=
y)
>> > that I can then use in my code with a loop.
>>
>> The function defined-colors will return the list of names of supported
>> colors.  The function color-values will return the RGB triplet for the
>> given color.
>
> How does the computation for white give 65535 ?
>
> "white" 65535 65535 65535

65535 is 0xFFFF. So the RGB values are 16 bit integers and "white" means
the max of all three.