frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

Open in hackernews

Show HN: A color name API that maps hex to the closest human-readable name

https://meodai.github.io/color-name-api/
33•meodai•1d ago
I built this API to return the closest named color for any hex value—using curated lists like my own [1], XKCD [2], and others.

I made it from scratch without Express or any frameworks because:

- I’m a frontend/interaction dev and wanted to learn how to build an API from the ground up. - Existing APIs didn’t guarantee unique names per color—mine does. - It also supports WebSocket updates, gzip responses, and multiple name sets.

I’ve been collecting color names for over 10 years [1]. With ~30,000 entries, bundling them into every color-related project became excessive. This API keeps things lightweight—for me and hopefully for others too.

GitHub: https://github.com/meodai/color-name-api

Would love feedback on naming logic, accuracy, performance, or backend best practices I might’ve missed.

[1] Large Color Name List: https://github.com/meodai/color-names [2] XKCD color survey results: https://xkcd.com/color/rgb/

Comments

rossant•2h ago
What distance metrics do you use?
meodai•1h ago
CIEDE2000 ΔE: https://github.com/meodai/color-name-api/blob/main/src/close...
meodai•47m ago
PS: I've added a section to the Readme: https://github.com/meodai/color-name-api?tab=readme-ov-file#...
Gys•2h ago
Beautifully made! But I struggle a little for thinking of use cases? Maybe add some to the readme.

Also, I think adding a kind of ‘main color’ would be useful. For example ‘shore’ being in the category ‘blue’ or maybe even ‘light blue’. Because for ‘shore’ itself I personally would associate with sand and maybe yellow.

meodai•1h ago
Oh I mostly use it for my own apps – it just feels more human-readable than hex codes. But yeah, you're right, I should add some example use cases to the readme!

Like here:

https://farbvelo.elastiq.ch/ or https://meodai.github.io/poline/

Thanks a lot for the feedback, I really appreciate it!

kiru_io•1h ago
Wow, pretty cool to see the color-names project here. I made a simple color guessing website a few years ago [0] using your library. I almost forgot it till someone reminds how they enjoyed it ([1]).

[0] https://colorguesser.com/ [1] https://x.com/wifeofnoob/status/1935788167086436375

meodai•1h ago
nice its very addicting :D
magic_hamster•1h ago
This is nicely done, but can you please explain why you need this? What is the use of the color names when you already know the actual color value and can use it?
auscompgeek•1h ago
This can be useful for accessibility. For example you might have a colour palette that users can add to, but the colours are only stored as hex codes. Giving a screen reader user just RGB values isn't as helpful as providing a name alongside it.
meodai•1h ago
Thanks! Good question – it's mostly about readability and communication. Hex codes are precise but not intuitive. Names give context, like saying “salmon” instead of #fa8072. That’s helpful in design tools, UI previews, generative art, or even debugging.

Also, the API works the other way around too – you can search by name to get the matching color: https://api.color.pizza/v1/docs/#api-Default-getColorNames. I did not add it to the website yet, because I don't have good UI ideas for it yet.

chownie•50m ago
N=1 but I'm colourblind and frequently I need to talk to someone about a UI colour while not having any idea what the colour is called, this kind of thing is useful for me.
meodai•44m ago
That's great to hear! I've gotten some very positive feedback from sight-impaired users for this little tool that uses the API: https://words.github.io/color-description/ — it turns colors into descriptive text (no AI involved)
polonbike•10m ago
N>1, proportion of colourblind people depends on the origin, but there are many of us. In Europe, nearly 10% of males are impacted by one of the colourblind variant, aka millions of people. Some of those people are dev, designers, or working alongside some sort color requirements, but none of them are graphists and can choose colors. Having a tool to provide a name instead of an hex code is useful to discuss colors with other stakeholders (customers, colleagues, etc...)
unconed•5m ago
I made a similar tool that can work on images and the camera. In addition to color picking, it adds moving stripes so you can visually tell the difference between colors you might otherwise not tell apart.

https://unblind.tech

kotaKat•48m ago
Curious if you could run it against the big old list of HN topcolors...

https://news.ycombinator.com/topcolors

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

Samsung Embeds IronSource Spyware App on Phones Across WANA

https://smex.org/open-letter-to-samsung-end-forced-israeli-app-installations-in-the-wana-region/
378•the-anarchist•7h ago•211 comments

Agentic Misalignment: How LLMs could be insider threats

https://www.anthropic.com/research/agentic-misalignment
28•helloplanets•2h ago•14 comments

AbsenceBench: Language models can't tell what's missing

https://arxiv.org/abs/2506.11440
239•JnBrymn•12h ago•52 comments

Unexpected security footguns in Go's parsers

https://blog.trailofbits.com/2025/06/17/unexpected-security-footguns-in-gos-parsers/
42•ingve•2d ago•5 comments

Phoenix.new – Remote AI Runtime for Phoenix

https://fly.io/blog/phoenix-new-the-remote-ai-runtime/
467•wut42•19h ago•200 comments

Harper – an open-source alternative to Grammarly

https://writewithharper.com
332•ReadCarlBarks•14h ago•87 comments

Chromium Switching from Ninja to Siso

https://groups.google.com/a/chromium.org/g/chromium-dev/c/v-WOvWUtOpg
66•hortense•3d ago•34 comments

YouTube's new anti-adblock measures

https://iter.ca/post/yt-adblock/
500•smitop•17h ago•777 comments

Mathematicians Hunting Prime Numbers Discover Infinite New Pattern

https://www.scientificamerican.com/article/mathematicians-hunting-prime-numbers-discover-infinite-new-pattern-for/
61•georgecmu•2d ago•20 comments

Show HN: A color name API that maps hex to the closest human-readable name

https://meodai.github.io/color-name-api/
33•meodai•1d ago•16 comments

Delta Chat is a decentralized and secure messenger app

https://delta.chat/en/
18•Bluestein•4h ago•5 comments

Learn You Galois Fields for Great Good (00)

https://xorvoid.com/galois_fields_for_great_good_00.html
74•signa11•10h ago•14 comments

Tiny Undervalued Hardware Companions (2024)

https://vermaden.wordpress.com/2024/03/21/tiny-undervalued-hardware-companions/
71•zdw•8h ago•16 comments

Augmented Vertex Block Descent (AVBD)

https://graphics.cs.utah.edu/research/projects/avbd/
30•bobajeff•6h ago•2 comments

Sega mistakenly reveals sales numbers of popular games

https://www.gematsu.com/2025/06/sega-mistakenly-reveals-sales-numbers-for-like-a-dragon-infinite-wealth-persona-3-reload-shin-megami-tensei-v-and-more
116•kelt•4h ago•79 comments

Visualizing environmental costs of war in Hayao Miyazaki's Nausicaä

https://jgeekstudies.org/2025/06/20/wilted-lands-and-wounded-worlds-visualizing-environmental-costs-of-war-in-hayao-miyazakis-nausicaa-of-the-valley-of-the-wind/
220•zdw•19h ago•63 comments

Wiki Radio: The thrilling sound of random Wikipedia

https://www.monkeon.co.uk/wikiradio/
110•if-curious•13h ago•24 comments

Show HN: Nxtscape – an open-source agentic browser

https://github.com/nxtscape/nxtscape
257•felarof•17h ago•167 comments

AMD's Freshly-Baked MI350: An Interview with the Chief Architect

https://chipsandcheese.com/p/amds-freshly-baked-mi350-an-interview
98•pella•13h ago•50 comments

Plastic bag bans and fees reduce harmful bag litter on shorelines

https://www.science.org/doi/10.1126/science.adp9274
51•miles•10h ago•30 comments

On memes, mimetic desire, and why it's always that deep

https://caitlynclark.substack.com/p/deeping-it-manifesto
10•lawrenceyan•1d ago•1 comments

Show HN: We moved from AWS to Hetzner, saved 90%, kept ISO 27001 with Ansible

https://medium.com/@accounts_73078/goodbye-aws-how-we-kept-iso-27001-slashed-costs-by-90-914ccb4b89fc
41•sksjvsla•1h ago•12 comments

Using Microsoft's New CLI Text Editor on Ubuntu

https://www.omgubuntu.co.uk/2025/06/microsoft-edit-text-editor-ubuntu
14•jandeboevrie•3d ago•9 comments

College baseball, venture capital, and the long maybe

https://bcantrill.dtrace.org/2025/06/15/college-baseball-venture-capital-and-the-long-maybe/
156•bcantrill•4d ago•109 comments

Alpha Centauri

https://www.filfre.net/2025/06/alpha-centauri/
149•doppp•17h ago•50 comments

Oklo, the Earth's Two-billion-year-old only Known Natural Nuclear Reactor (2018)

https://www.iaea.org/newscenter/news/meet-oklo-the-earths-two-billion-year-old-only-known-natural-nuclear-reactor
182•keepamovin•1d ago•101 comments

People instantly decide whether to trust a product based on design

https://www.andrewcoyle.com/blog/beauty-is-objective
55•coyleandrew•4h ago•19 comments

Tuxracer.js play Tux Racer in the browser

https://github.com/ebbejan/tux-racer-js
118•retro_guy•17h ago•34 comments

Smartphones: Parts of Our Minds? Or Parasites?

https://www.tandfonline.com/doi/full/10.1080/00048402.2025.2504070
78•cratermoon•14h ago•34 comments

Verified dynamic programming with Σ-types in Lean

https://tannerduve.github.io/blog/memoization-sigma/
77•rck•3d ago•26 comments