The idea was to create a tool to sort the named CSS colors in a way that it shows related colors together. So, next time I can't decide between a few CSS colors, I can just check them here side by side. I've created this tool last summer, but I hadn't shared it here back then. It's a PWA that I made with pure JS.
Very cool. Please add permalinks/history state, so we can share specific hue or colors. Thanks!
Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way
61–70 of 167 posts
Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way
#62Good reminder that in CSS, darkgray is a light gray and gray is a dark gray. Also presumably up is down and wet is dry.
CSS is just an embarrassment of mistakes: white-space: nowrap So they take a word "whitespace" which needs no hyphen and jam one in. Then they take two completely distinct words "no wrap" and jam them together with no separator. And then you have to remember both of these on the same rule .
Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way
#63Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way
#64Good reminder that in CSS, darkgray is a light gray and gray is a dark gray. Also presumably up is down and wet is dry.
'Brown' is dark red, and to my eye 'sienna' has very little red in it. To get actual brown, you need 'saddlebrown'. CSS is super weird.
Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way
#65Are named CSS colors seeing any practical use?
Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way
#66Also, nice project :)
Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way
#67Slightly off topic, I always thought named CSS colors are generally ignored (in favour of 'rgba' / '#hex'). Are named CSS colors seeing any practical use?
Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way
#68This is very nicely done, but I still prefer the simplicity of http://davidbau.com/colors/ >. Despite being only 2-dimentional, I find that layout strangely more intuitive. I think the author manually tweaked the color positions, so that may be the reason.
Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way
#69Earlier quoted context omitted.
I prefer to use named colors in my own CSS layouts. "lightsalmon" is more descriptive to me than "#FFA07A" or "rgb(255, 160, 122)" or "hsl(17, 100%, 73.9%)" at a glance.
A good IDE will show a color preview https://code.visualstudio.com/assets/docs/languages/css/colo...
Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way
#70This is definitely a cool way of exploring CSS colors. But, serious question: does anyone actually use CSS colors except for a handful of the basics ("red", "blue") for prototyping/debugging? I mean, the idea of typing "background-color: lightsalmon;" just feels so bizarre to me. Whenever I've needed to come up with colors from scratch, I'll just start with an intuitive best guess -- e.g. "hsl(30, 80%, 50%)" -- and t…
Using the color names is more accessible. People with vision disabilities can have a custom plugin that changes the colors based on their name, instead of trying to convert all the hex codes.
Does this exist, or is this hypothetical? If it exists, it's something I would add to my toolkit.