Lurker News

Comments (159) 35 threads

knuptfad7 replies#
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.

muli_d#
This is very cool, I love it. Thanks for sharing.
achairapart1 reply#
Very cool. Please add permalinks/history state, so we can share specific hue or colors. Thanks!
uhtred2 replies#
Looks like it's on Github, you could submit a pull request to add those things :)
regularjack1 reply#
I think giving feedback is a valid way to contribute, I certainly would welcome feedback if it were my project. Not all contributions must be code.

Continue this thread — 1 reply

preommr3 replies#
It's always the smiley face that takes a comment from idiosyncratic but potentially earnest to condescending and passive-aggressive.

Continue this thread — 3 replies

flanbiscuit#
I've needed this in my life so many times, thank you for creating this!
sam1r2 replies#
Awesome! Could you possibly implement a double-click to clipboard copy option?
sam1r#
Happy to make a PR or just do it quickly!

Edit: here you go https://pastebin.com/5Kypr4kh
Edit 2: I would, but I'm at work so personal GH is a no-go atm. I'll cycle back here EOD & make the PR if OP agrees w/ proposal

knuptfad#
Thanks for the suggestion. Could be nice to have, but then there must be a visual feedback for the user. Issues/PRs are welcomed in the GH repo.
forgotmypw17#
Thank you for creating and sharing. Very nice app.
owly#
This is really well done. Congratulations on making such a useful tool. Thanks for sharing!
anarcat#
is there a way to change the "hue tolerance" without hacking the source? or is that part of the design? :)

in other words: how can i just bunch more colors together?

crazygringo12 replies#
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 then iterate a couple times till I get what I'm looking for.
It seems like even more effort to try to select colors from the CSS palette when it might turn out that there isn't even a satisfactory one. The CSS colors are still extremely limited. E.g. the distance between neighbors like "dark cyan" and "darkslategray" is huge.

codazoda4 replies#
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.
reaperducer3 replies#
Awesome if you're in your office on your usual work computer. Not great if you're in the field trying to make quick fixes on whatever terminal a client provides.

Continue this thread — 3 replies

runarberg#
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;
lucideer1 reply#
> "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).

crazygringo1 reply#
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.

Continue this thread — 1 reply

Ashanmaril1 reply#
It's more descriptive, but usually you design UIs for the user, not for the developer writing the CSS
lucideer#
Sorry I don't understand your comment?

This thread is about developers writing CSS...

NetOpWibby1 reply#
I have had my favorite hex memorized since about 2012: #07D0EB

Continue this thread — 1 reply

jedberg4 replies#
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.

mpetroff1 reply#
This would be true if the CSS color names were actually reasonable, but many of them are not.

One would be better off using the results [1] of Heer & Stone (2012) [2] (or a similar analysis) to assign names to sRGB colors. You end up with 33 unique names instead of more than 100, and the number of unique names can be reduced further by merging synonyms.
[1] http://vis.stanford.edu/color-names/analyzer/ [2] https://doi.org/10.1145/2207676.2208547

jedberg1 reply#
It doesn't matter what the names are, the point is you can have a plugin that changes one color to another based on their names and what you can see. The names are a much smaller search space than "all possible hex codes".

Continue this thread — 1 reply

crazygringo1 reply#
Are you saying such a plugin exists that only works with named colors?

That would seem like a... usability disaster.
Any accessibility tool for vision should operate at an OS level to map colors across everything. And even if you wanted a web-only tool, it would need to similarly operate across all colors -- whether hex codes or in images or SVG's. Very few sites use any named CSS colors at all except for "white" or "black".
There are lots of areas where it's important to keep accessibility in mind... but named CSS colors would not seem to be one of them.

kall#
For contrast, css can be quite effective. A brute force background black, text white, link yellow has served me very well. For color blindness correction an OS level filter is the way to go.
reaperducer1 reply#
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.

jedberg1 reply#
I honestly don't know, it's just what I was told by someone who is visually impaired a long time ago. That it's easier if people use the names instead of the hex codes because then they can more easily convert that.

Continue this thread — 1 reply

kall#
I feel pretty confident saying that is not a relevant use case. I used to use a hand written user stylesheet for color accessibility and know various people using different tools to get the contrast they need. Named colors are not a factor.
munificent#
> 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%)"

That's what I do too, but I find it leads me to get stuck in a rut with certain color areas. Looking at this site was a good reminder to me to give named colors a try just because it will help me break out of my usual color habits.

ericwood#
I've never used them or seen them used for large-scale production sites but I reach for them all the time when building out small proof of concept or isolated examples for debugging in places like Codepen. It's handy to have a few appealing colors memorized when you're sketching things out.
smoe1 reply#
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.

xmprt1 reply#
This might be a dumb question but how would named colors be more consistent across monitors? I thought they mapped to the same RGB value so there would be no difference between 'red' and #FF0000.
smoe1 reply#
I remembered it wrongly. It wasn't about named colors, but "web-safe colors" that can be displayed by 256 color displays directly, without having to fallback to the closest color or by using dithering. Some of them happened to have a name attached to it. Don't know if the original 16 named colors are also all safe colors.

https://en.wikipedia.org/wiki/Web_colors#Web-safe_colors

Continue this thread — 1 reply

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

Continue this thread — 6 more replies

tobr28 replies#
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.

Continue this thread — 28 replies

netmare2 replies#
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.

Continue this thread — 2 replies

Load more comments