Readit News logoReadit News
meodai commented on Show HN: A color name API that maps hex to the closest human-readable name   meodai.github.io/color-na... · Posted by u/meodai
kuehle · 2 months ago
Makes me wonder which area of the Color space has the lowest resolution. As in “this name covers the most hex codes”.
meodai · 2 months ago
Wonder no longer: https://codepen.io/meodai/full/zdgXJj/ Color distribution of Color-Names in various color models
meodai commented on Show HN: A color name API that maps hex to the closest human-readable name   meodai.github.io/color-na... · Posted by u/meodai
Theodores · 2 months ago
I fully approve of this app. My use case is CSS, more specifically SVG. I put SVG in custom properties for things like icons, then use them as pseudo elements, thereby keeping decoration out of the HTML and avoiding downloads for SVG specified in CSS. My SVG is always human readable and simple.

The slight problem with this is that I don't like having to escape the '#' character for colours. I prefer the nearest name, e.g. 'Chocolate' (which is orange).

Hence I have bookmarked this page.

One observation, I have now moved to oklch for everything else. I only do named colours and oklch, hex codes have gone the way of CMYK for me.

Are there any plans to make this tool oklch-friendly?

meodai · 2 months ago
Thanks for the feedback. For now you would have to do the conversion yourself, but I plan to store the names in a more absolute format like xyz…
meodai commented on Show HN: A color name API that maps hex to the closest human-readable name   meodai.github.io/color-na... · Posted by u/meodai
IshKebab · 2 months ago
Yeah I agree. Maybe useful if it wasn't nonsense paint colour names.
meodai · 2 months ago
The API provides plenty of lists that should fit your less ‘nonsensical’ needs.
meodai commented on Show HN: A color name API that maps hex to the closest human-readable name   meodai.github.io/color-na... · Posted by u/meodai
tillcarlos · 2 months ago
Is your name Mèo Dài - Longcat in Vietnamese? :)

Cool project! I wonder what commercial use cases come from it. On the My First Million podcast they talked a about a company selling color predictions to brands for multiple six figures. Maybe you can find correlations and predictions in the data one day.

meodai · 2 months ago
nước đái I use it for all kinds of color generators.
meodai commented on Show HN: A color name API that maps hex to the closest human-readable name   meodai.github.io/color-na... · Posted by u/meodai
pimlottc · 2 months ago
I would also find such a tool useful, but names like “Watermelon Sugar”, “Tidal”, or “Singapore Orchid” don’t really help me at all. Just tell me something like “dark brown”, “pale green”, “hot pink”, “tan”, etc.
meodai · 2 months ago
If you scroll down a bit, you will see that the api provides all kind of lists, there are plenty that are more descriptive or simpler depending on what you are going for.
meodai commented on Show HN: A color name API that maps hex to the closest human-readable name   meodai.github.io/color-na... · Posted by u/meodai
rustc · 2 months ago
> Having a tool to provide a name instead of an hex code is useful to discuss colors with other stakeholders (customers, colleagues, etc...)

But how useful are names that this website shows, e.g. the first few random names I got were "Singapore Orchid", "Scented Spring", "Lamiaceae", and "Lunatic Sky Dancer"?

meodai · 2 months ago
I provide all kind of name lists. Depends a lot on what you are trying to accomplish. But there are plenty of lists providing more recognizable ones.
meodai commented on Show HN: A color name API that maps hex to the closest human-readable name   meodai.github.io/color-na... · Posted by u/meodai
ZoomZoomZoom · 2 months ago
There's also https://colornames.org/ - crowdsourced attempt at naming all the colours. Currently at 25% (4215221).
meodai · 2 months ago
Unfortunately most of the names are pretty bad.
meodai commented on Show HN: A color name API that maps hex to the closest human-readable name   meodai.github.io/color-na... · Posted by u/meodai
airstrike · 2 months ago
Really nice idea. I've thought about building something similar but it's not a core feature of my product so I keep postponing it.

I do have to ask, though. Why would I ever want to resolve a color name as a network request instead of calling a function?

meodai · 2 months ago
Because a) I keep adding names and b) the list weights over 1mb https://github.com/meodai/color-names
meodai commented on Show HN: A color name API that maps hex to the closest human-readable name   meodai.github.io/color-na... · Posted by u/meodai
nkrisc · 2 months ago
You have to scroll all the way to the top to turn off the distracting shapes falling, at least on mobile.
meodai · 2 months ago
yes! but I could add a second button at the footer. (it also respects the reduced motion flag, if you set it in your OS)
meodai commented on Show HN: A color name API that maps hex to the closest human-readable name   meodai.github.io/color-na... · Posted by u/meodai
kotaKat · 2 months ago
Curious if you could run it against the big old list of HN topcolors...

https://news.ycombinator.com/topcolors

meodai · 2 months ago
I just did, using `npx palette-aldente hn-colors.yml --formats name --namelist bestOf`: https://codepen.io/meodai/pen/ByNqbKE

u/meodai

KarmaCake day107November 4, 2014
About
Self employed Design & Interaction developer
View Original