---
title: "Convert a color"
method: POST
path: "/api/v1/convert-color"
---

# Convert a color

`POST /api/v1/convert-color`

## Request

- Base URL: `https://pickshade.com`
- URL: `https://pickshade.com/api/v1/convert-color`
- Auth: none declared

Convert a color between formats: hex, rgb, hsl, hsv, hwb, cmyk, lab, lch, oklab, oklch, display-p3, rec2020, xyz and platform code (swiftui, uikit, flutter, android). Values follow CSS Color 4.

## Request body

- object
  - `color` string, required: Any color: #ff5733, rgb(255 87 51), hsl(11 100% 60%), oklch(68% 0.21 34), a CSS or common name like navy, or a Tailwind class like sky-500
  - `formats` string[]: Formats to return. Defaults to hex, rgb, hsl, oklch, oklab and display-p3

## 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)
