Palette Studio turns a single color — or the word “ocean” — into complete light and dark token systems. Every semantic pair is verified against WCAG before it is returned, so what the API hands your agent is safe to ship.
# One request. A production-ready system. curl "$API/v1/tokens?seed=ocean&contrast=AAA" { "meta": { "contrastTarget": "AAA" }, "themes": { "light": { "brand": { "solid": "#0B4A7A", "onSolid": "#FFFFFF" } } }, "audit": { "light": { "passing": 21, "total": 21 } } }
This runs the exact engine the API runs, in your browser. The interface below is not a picture — it is live markup rendered with the generated tokens.
| Invoice | Client | Amount | Status |
|---|---|---|---|
| INV-2041 | Meridian Labs | $12,400 | Paid |
| INV-2040 | Ashford & Co | $3,180 | Pending |
| INV-2039 | Volta Systems | $8,750 | Overdue |
| INV-2038 | Kestrel Group | $1,920 | Draft |
| Pair | Colors | WCAG | APCA Lc | Result |
|---|
Three problems separate a real token system from five hex codes in a row.
The shaded region is the maximum chroma sRGB can actually display at each lightness for this hue. Ask for more saturation than that and a naive generator silently clips, which is how palettes end up with two steps that render identically.
HSL says 50% lightness for both yellow and blue, then renders one
twice as bright as the other. Everything here happens in OKLCH, where equal steps
look equal.
Out-of-range colors are resolved by reducing chroma while lightness and hue hold — the strategy CSS Color 4 specifies — instead of clipping channels and shifting the hue.
Most tools report that a pair failed. This one moves the color until it passes, including mid-tone button fills where neither white nor black text reaches 4.5:1.
An OpenAPI 3.1 spec and a plugin manifest ship at the root, so agent frameworks can register these endpoints as tools without anyone writing a wrapper.
api/; npx wrangler deploy
puts it on your own Cloudflare account, then paste that URL here and the examples update.
| Parameter | Type | Default | Description |
|---|---|---|---|
seed | string | random | Hex color, keyword such as ocean, or a hue number. |
contrast | enum | AA | AA targets 4.5:1, AAA targets 7:1. |
modes | string | light,dark | Which themes to return. |
format | enum | json | json, css, scss, tailwind, style-dictionary, swift, android. |
neutralTint | number | 0.012 | Chroma bled into the neutral ramp so greys belong to the brand. |
hueTorsion | number | 4 | Degrees of hue drift across the ramp, as hand-built scales do. |
Anonymous access is deliberately open so an agent can discover and trial the API mid-task. The limit is low enough that production use needs a key.
No key, no account. For trials and agent discovery.
For products and agent fleets running this in production.
Run the Worker on your own Cloudflare account. Source is in this repo.