Live data from Hacker News

Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way

enes.in

91–100 of 167 posts

Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way

#91

This 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…

When I started web dev in the early 2000s, I remember it being recommended to use the named colors because of them being more consistent accross different monitors. Not sure if this was true at all and/or only for the original 16 basic colors.

Nonetheless, I kept using them for a while, because I think it makes the css easier to read, when having names (even suboptimal ones) over hex codes.

But with the introduction of css preprocessors in the late 2000s that allow defining variables, I have not used them since.

Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way

#92
I love this! I am one of the rare people who use named colors all of the time, and this will definitely get a bookmark from me!

Especially during prototyping/design, it's soooo much easier to keep your designs consistent with a named look-alike color, then switch over to brand colors with a find/replace.

For personal projects, I almost exclusively use named colors.

Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way

#94

Earlier quoted context omitted.

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 .

"White space" is two words, not one.

"White" and "space" are two words, and "Whitespace" is one word.

Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way

#95
post #9

Good reminder that in CSS, darkgray is a light gray and gray is a dark gray. Also presumably up is down and wet is dry.

Some background about why dark gray is lighter than gray, plus some other idiosyncrasies:

https://en.wikipedia.org/wiki/X11_color_names#Clashes_betwee...

Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way

#97
post #63

This 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.

This one works on mobile. The one you linked to does not.

What do you mean? It's just a static HTML table and it looks fine on both my Android 11 phone with Opera and in Firefox's Responsive mode on the desktop. It may not be mobile-friendly, but that's not inherently bad, especially for something that's not meant to be used on a phone.

Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way

#99

This 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…

In my case it was the convenience of directly adding the alpha channel value which made me move to `rgba()`

Re: Show HN: Sorted CSS Colors – Sort the named CSS colors in a nice way

#100

This 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…

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.

> "lightsalmon" is more descriptive to me than "#FFA07A" or "rgb(255, 160, 122)"

While I agree, I feel that learning to look at "#FFA07A" and immediately grok "pink" has been of general benefit to me as a frontend dev.

> or "hsl(17, 100%, 73.9%)" at a glance

I must admit though that I haven't mastered identifying hue by number just yet (though if I do, it will be even better as Saturation and Lightness/Luminosity are much easier to reason about).

Post reply on HN