For developers

A color API with no key

All 254 colors from the library as static JSON: hex, RGB, HSL, HSV, CMYK, CIELAB, LCH and OKLCH, a shade and tint ramp, WCAG contrast against white and ink black, and the nearest CSS keyword and Tailwind token. No signup, no key, no rate limit, CORS open to every origin, released under CC0-1.0.

Endpoints

EndpointReturns
/api/v1/colors.jsonAll 254 colors with every field.
/api/v1/color/{hex}.jsonOne color. Lowercase six digit hex, no hash. Unknown values return 404, matching the site's own behaviour.
/api/v1/families.jsonThe 10 families and which colors are in each.
/api/v1/schema.jsonJSON Schema (draft 2020-12) for the payload above, so you can validate instead of trusting.

Examples

curl

Shell
curl -s https://huekit.co/api/v1/colors.json | jq '.colors[0]'

JavaScript

JavaScript
const res = await fetch("https://huekit.co/api/v1/colors.json"); const { colors } = await res.json(); // Every color that passes WCAG AA as text on a white page const readable = colors.filter((c) => c.contrast.aaNormalOnWhite); console.log(readable.length, "of", colors.length);

Python

Python
import urllib.request, json url = "https://huekit.co/api/v1/colors.json" data = json.load(urllib.request.urlopen(url)) blues = [c for c in data["colors"] if c["family"] == "Blue"] blues.sort(key=lambda c: c["oklch"]["l"]) for c in blues[:5]: print(c["name"], c["hex"], c["oklch"])

License and attribution

The dataset is released under CC0-1.0, which means you can use it commercially, modify it and redistribute it without asking. Attribution is not required. A link back to https://huekit.co is appreciated and helps a small site stay findable, but nothing depends on it.

The names in the library are common usage, curated by hand. They are not a standard. Where a name matters legally or technically, cite the CSS keyword instead: those 148 names are fixed by CSS Color Module Level 4 and every color record here names its nearest one.

Versioning

The path carries the major version. Inside /api/v1/ fields will be added but never removed or renamed, and values will only change if a value was wrong. A breaking change gets /api/v2/ and v1 stays where it is. Current dataset version is 1.0.0, reported in every payload. Changes are listed in the changelog.

How it is served

These are static files generated at build time, not a running service. There is no database, no logging of what you request beyond the ordinary CDN request log, and nothing you send is stored. This does not weaken the promise on the rest of the site: the API sends data out, it does not take any in.

Because it is static, it is fast and it will not go down separately from the site. It also means there is no query parameter filtering. Fetch the file once, filter in your own code, cache it.

Related

Last updated by FusionStudios. Every value on this page is computed by the same functions the tools use. How this is calculated.