---
title: "Export colors as code"
method: POST
path: "/api/v1/export-tokens"
---

# Export colors as code

`POST /api/v1/export-tokens`

## Request

- Base URL: `https://pickshade.com`
- URL: `https://pickshade.com/api/v1/export-tokens`
- Auth: none declared

Turn a list of colors into ready code: CSS custom properties, a Tailwind v4 @theme block, SCSS variables, JSON, W3C design tokens (DTCG), a JavaScript array or an SVG swatch strip. Unnamed colors get their closest color name.

## Request body

- object
  - `colors` object[], required
    - `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
    - `name` string: Token name
  - `format` 'css' | 'tailwind' | 'scss' | 'json' | 'dtcg' | 'array' | 'svg'
  - `values` 'oklch' | 'hex' | 'rgb' | 'hsl' | 'display-p3': How color values are written

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