Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: PickShade color Make Gradient API
version: 1.0.0
description: 'Free color API: parse, convert, contrast (WCAG 2 and APCA), gamut, names, scales, harmonies, mixing, palettes, color blindness and design token export. Color math follows CSS Color 4. No key needed.'
servers:
- url: https://pickshade.com
tags:
- name: Make Gradient
paths:
/api/v1/make-gradient:
get:
operationId: make_gradient_get
summary: Make a CSS gradient
description: 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.
responses:
'200':
description: Result
content:
application/json: {}
'400':
description: Invalid input
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'429':
description: Too many requests. See the Retry-After header
parameters:
- name: colors
in: query
required: true
schema:
minItems: 1
maxItems: 12
type: array
items:
type: string
minLength: 1
maxLength: 120
description: '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'
description: Gradient stops in order, 2 to 12
- name: kind
in: query
required: false
schema:
default: linear
type: string
enum:
- linear
- radial
- conic
- name: angle
in: query
required: false
schema:
default: 90
description: Angle in degrees for linear
type: number
minimum: 0
maximum: 360
- name: space
in: query
required: false
schema:
default: oklab
type: string
enum:
- oklab
- oklch
- srgb
- srgb-linear
- lab
- lch
- name: stops
in: query
required: false
schema:
default: 7
description: How many precomputed stops the fallback gets
type: integer
minimum: 2
maximum: 32
tags:
- Make Gradient
post:
operationId: make_gradient
summary: Make a CSS gradient
description: 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.
requestBody:
required: true
content:
application/json:
schema:
$schema: https://json-schema.org/draft/2020-12/schema
type: object
properties:
colors:
minItems: 1
maxItems: 12
type: array
items:
type: string
minLength: 1
maxLength: 120
description: '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'
description: Gradient stops in order, 2 to 12
kind:
default: linear
type: string
enum:
- linear
- radial
- conic
angle:
default: 90
description: Angle in degrees for linear
type: number
minimum: 0
maximum: 360
space:
default: oklab
type: string
enum:
- oklab
- oklch
- srgb
- srgb-linear
- lab
- lch
stops:
default: 7
description: How many precomputed stops the fallback gets
type: integer
minimum: 2
maximum: 32
required:
- colors
example:
colors:
- '#2563eb'
- '#f97316'
kind: linear
angle: 90
space: oklab
responses:
'200':
description: Result
content:
application/json: {}
'400':
description: Invalid input
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'429':
description: Too many requests. See the Retry-After header
tags:
- Make Gradient
components:
schemas:
Problem:
type: object
properties:
type:
type: string
title:
type: string
status:
type: integer
detail:
type: string