Derive a palette from a subject, when there is no photograph yet
palette_from_subjectGenerates a two-state color palette from a subject or hue in OKLCH, emitting hex values and a WCAG contrast matrix to prevent unreadable color pairs.
Instructions
Builds a complete two-state palette from one anchor hue, in OKLCH, and emits hex.
It cannot return one of the ten banned Tailwind indigos or the emerald that replaced them, cannot return pure black or pure white, holds every neutral at 0.005-0.015 chroma of the anchor hue so the greys belong to the same page as the accent, never shifts the hue between light and dark, and returns a WCAG contrast matrix for every pair a page actually puts together — so an unreadable pair cannot be chosen by accident.
It also tells you where the hue came from. If the subject names something real, it names the object. If it does not, it says the hue came from a hash of the words — which is not the same thing, and palette_from_image on a photograph is the stronger move.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| hue | No | Force an anchor hue in OKLCH degrees, 0-360, if you already know the colour you want. | |
| subject | Yes | What the site is about, in a few words. For example: "chess lessons, Brooklyn". | |
| accent_chroma | No | How loud the accent is. The corpus band is 0.12-0.22; the default is 0.16. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| css | No | ||
| fix | No | ||
| why | No | ||
| dark | No | ||
| tool | Yes | Which tool produced this. | |
| audit | No | ||
| light | No | ||
| notes | No | ||
| status | Yes | pass = checked and clean. fail = checked and found problems. skipped = nothing was measured. error = the tool could not run. | |
| problem | No | ||
| subject | No | ||
| contrast | No | ||
| headline | Yes | One sentence verdict, safe to show a non-technical user. | |
| accent_hue | No | ||
| anchor_hue | No | ||
| error_code | No | Set only when status is "error". | |
| hue_source | No | ||
| derived_from_something_real | No |