---
title: "Fix contrast"
method: GET
path: "/api/v1/fix-contrast"
---

# Fix contrast

`GET /api/v1/fix-contrast`

## Request

- Base URL: `https://pickshade.com`
- URL: `https://pickshade.com/api/v1/fix-contrast`
- Auth: none declared

Find the closest color that reaches a contrast target by changing only OKLCH lightness, so the hue and character stay. Targets: aa (4.5:1), aa-large (3:1), aaa (7:1), apca-body (Lc 75), apca-content (Lc 60), apca-large (Lc 45). Adjust the text color or the background.

## Query parameters

- `text` string, required: Text or foreground color
- `background` string, required: Background color
- `target` 'aa' | 'aa-large' | 'aaa' | 'apca-body' | 'apca-content' | 'apca-large'
- `adjust` 'text' | 'background'

## Response `200`

Result

## Other responses

- `400`: Invalid input
- `429`: Too many requests. See the Retry-After header

---

[API](https://skmtc.dev/pickshade/apis/pickshade-color-api.md) · [All operations](https://skmtc.dev/pickshade/apis/pickshade-color-api/llms.txt) · [OpenAPI document](https://skmtc.dev/pickshade/apis/pickshade-color-api/revisions/00f0b7c55ea7?raw)
