Re: Retrieving color names and hex values using list-colors-display for coding purposes
Heime <[email protected]> Thu, 16 Jul 2026 16:35:09 +0000
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <fLZvGV2o8byiWY5r2-hLM67e46-6qVmv1aEeoE13kAMjn26hYAO9lBQDjFHyBWCnhQj0oZfy4B4R4uuTfeF3ZvpppNS0AXeM1YWX0w3L0zs=@protonmail.com> |
On Friday, July 17th, 2026 at 3:48 AM, packrat386 <[email protected]> wrote= : > "Heime" <[email protected]> writes: >=20 > > On Thursday, July 16th, 2026 at 5:42 PM, Eli Zaretskii <[email protected]> w= rote: > > > >> > 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-disp= lay) > >> > 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 >=20 > 65535 is 0xFFFF. So the RGB values are 16 bit integers and "white" means > the max of all three. Then the maximum value should be 2^16 as listed. I expected=20 the 24-bit true colour palette. How could I determine the=20 number of bits used for each colour on the system?