A color API you can call from anywhere.
Generate palettes, check WCAG and APCA contrast, build Tailwind scales and light and dark color systems, and audit a codebase’s colors, over plain HTTP. Free, no API key, open CORS, and the same engine that runs the website and the MCP server.
How to call the color API
- Send a GET request to an endpoint, for example /api/v1/palette?seed=6842C2&mode=analogous&count=5. Hex colors are six digits, and in a URL you leave out the #.
- Read the JSON response. For /api/v1/contrast?fg=1F2937&bg=FFFFFF you get the contrast ratio with WCAG and APCA results.
- Build scales and systems with /api/v1/scale and /api/v1/system, or POST your files to /api/v1/audit to audit their colors.
- Import the OpenAPI 3.1 document at /api/v1/openapi.json into Postman, Insomnia or a code generator.
What the API offers
No key, open CORS
There are no API keys, cookies or accounts, and responses allow any origin, so you can call it from any website.
Palettes and contrast
Generate a palette from a seed color and a harmony mode, and measure the WCAG and APCA contrast of any text and background pair.
Scales and color systems
Build Tailwind scales and light and dark color systems from one color, returned as JSON or ready-made CSS.
Codebase audit
POST stylesheet contents and get contrast failures, near-duplicates, off-token colors and missing dark roles.
Named colors and palettes
Look up named colors and the curated palette collection over HTTP.
OpenAPI 3.1
The full contract is a published OpenAPI document, and the endpoint reference on this page is generated from it.
Frequently asked questions
Is the GetColors API free?
Yes. The API is free to use with no key, and it is the same engine that powers the website and the MCP server.
Do I need an API key?
No. Anonymous use is limited to 60 requests per minute per IP address, shared across the compute endpoints.
Can I call the API from the browser?
Yes. Responses carry Access-Control-Allow-Origin: * and never allow credentials, so you can call the API from any website.
What happens when I reach the rate limit?
You get HTTP 429 with the code RATE_LIMITED and a Retry-After header in seconds. A RateLimit-Remaining header is sent on every response.
Which contrast standards does it return?
WCAG 2 contrast ratios with the AA and AAA results, and APCA Lc values.