---
title: "Make a CSS gradient"
method: GET
path: "/api/v1/make-gradient"
---

# Make a CSS gradient

`GET /api/v1/make-gradient`

## Request

- Base URL: `https://pickshade.com`
- URL: `https://pickshade.com/api/v1/make-gradient`
- Auth: none declared

Build a CSS gradient from 2 or more colors with interpolation in OKLab, OKLCH or sRGB. Returns modern CSS with the color space, a fallback with precomputed stops for older browsers, and the stop colors. OKLab avoids the gray middle that sRGB gradients get.

## Query parameters

- `colors` string[], required: Gradient stops in order, 2 to 12
- `kind` 'linear' | 'radial' | 'conic'
- `angle` number: Angle in degrees for linear
- `space` 'oklab' | 'oklch' | 'srgb' | 'srgb-linear' | 'lab' | 'lch'
- `stops` integer: How many precomputed stops the fallback gets

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