←back to thread

97 points meodai | 3 comments | | HN request time: 0.679s | source

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/

Show context
kotaKat ◴[] No.44336110[source]
Curious if you could run it against the big old list of HN topcolors...

https://news.ycombinator.com/topcolors

replies(2): >>44336243 #>>44338253 #
1. h1fra ◴[] No.44338253[source]
what's the story behind this page?
replies(1): >>44340164 #
2. kotaKat ◴[] No.44340164[source]
once you receive 250+ karma, the topcolor setting enables in your profile, allowing you to specify a custom color code for the top bar of HN. this is a ranking of every custom topcolor set by users. :)
replies(1): >>44341638 #
3. efilife ◴[] No.44341638[source]
weren't these just latest colors set by users?