---
title: "Ui State Palette"
method: POST
path: "/palette/ui-states"
---

# Ui State Palette

`POST /palette/ui-states`

## Request

- Base URL: `https://api.colourmemory.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.colourmemory.com/palette/ui-states`
- Auth: none declared

Generate a complete UI state palette from a brand hex.

Returns WCAG-compliant colours for: success, warning, error, info,
hover, active, disabled, focus ring, and surface variants.
All states are computed to maintain sufficient contrast against the
supplied background. Each state includes hex, WCAG grade, and
a one-line usage note.

## Headers

- `x-api-key` string, nullable
- `origin` string, nullable

## Request body

- UIStatePaletteRequest
  - `brand_hex` string, required
  - `background_hex` string
  - `dark_mode` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/colourmemory/apis/colour-memory-api.md) · [All operations](https://skmtc.dev/colourmemory/apis/colour-memory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/colourmemory/apis/colour-memory-api/revisions/4ba028f64042?raw)
