in reply to A way to validate a string as a color:
in thread Best way to validate a string as a color?
Your list looks a little bit short:
>perl -nE '@x=split;$seen{join(" ",@x[0,1,2])}++;END{say 0+keys%seen}' + < /usr/share/X11/rgb.txt 512 >wc -l /usr/share/X11/rgb.txt 782 /usr/share/X11/rgb.txt >
(From Slackware64 14.2)
Alexander
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: A way to validate a string as a color:
by holli (Abbot) on Oct 17, 2017 at 20:55 UTC | |
<Reveal this spoiler or all in this thread> of duplicates and probably system dependent variations. I complied with the list on Wikipedia I linked to.
holli You can lead your users to water, but alas, you cannot drown them. | [reply] [d/l] |
by afoken (Chancellor) on Oct 17, 2017 at 21:06 UTC | |
Still, Slackware's rgb.txt defines 512 unique colors (and 270 dupes). The Xorg version is identical to the Slackware version. Alexander
-- Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-) | [reply] |
by holli (Abbot) on Oct 17, 2017 at 21:45 UTC | |
Also my hash doesn't include all the grays. But yes, more than in my list.
holli You can lead your users to water, but alas, you cannot drown them. | [reply] [d/l] |