Live data from Hacker News

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

enes.in

131–140 of 167 posts

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

#132

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…

Code is poetry when written as such, Words in stead of numbers add a nice touch Those who treat it as craft and an art May find that named colors are a good start.

*snap snap snap snap snap*

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

#133
Is there any value to named css colours beyond convenience for development?

I find that I use hex for properly designed colours and otherwise use like one of 15 named colours for devel placeholders.

Turns out there's like... 100.

Are they special? Or did someone just pick and give them names?

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

#134
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.

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 .

I would be so lost if vscode didn't autocomplete css so well for me.

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

#135

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…

Up until I started using SASS and working with designers who picked color palettes (or changed them FREQUENTLY!) I always used named colors. But with so many minute tweaks in the RGB hex values each UI review, the names lost meaning.

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

#138

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

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

I always found hex codes non-intuitive, but the hue values are easy once you just remember:

0 = red

120 = green

240 = blue

Then you just interpolate as desired, so yellow is 60, orange is 30, red-orange is 15.

And really all you need to remember is red = 0 (lowest energy wavelength) and the three RGB primaries are spread evenly around the 360° color wheel, therefore 0, 120, 240.

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

#139
post #34

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

And if you use a CSS pre-processor or—better yet—CSS custom properties you get your descriptive color anyway:

    --text-color: cornsilk;
    --background-color: peru;

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

#140

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…

As a webdev who is used to have professional designers by my side at my day job, lacking the color touch of an expert, I usually just pick a random named color for my hobby projects:

https://github.com/runarberg/random-go-stone-placements/blob...

Post reply on HN