Devoured - April 30, 2026
The Color api (Website)

The Color api (Website)

Design Read original

The Color API converts colors between formats, names them from a 2000+ color database, and generates color schemes through simple REST endpoints.

What: The Color API is an open-source web service with two main endpoints: /id for converting colors between hex, RGB, CMYK, HSL, HSV, and XYZ formats while providing human-readable names and best-contrast pairings, and /scheme for generating color palettes using modes like monochrome, analogic, complement, triad, and quad.
Why it matters: It eliminates the need to implement color conversion logic or maintain color naming databases, and outputs in JSON, HTML, or SVG formats for easy integration into web applications and design tools.
Takeaway: Test the API by calling endpoints like /id?hex=ffa or /scheme with your preferred color format to see conversion and scheme generation in action.
Original article

TheColorAPI color conversion, naming, scheming & placeholders

Your fast, modern, swiss army knife for color.

Pass in any valid color and get conversion into any other format, the name of the color, placeholder images and a multitude of schemes.

There are only two endpoints you need to worry about, /id and /scheme, and you can read the docs about both. Each endpoint is available in JSON[P], HTML & SVG format. The SVG format can be saved or used as an img[src] attribute for super-easy embedding/sharing!

Try Josh's favorite, for example, in JSON, HTML or SVG format.

How do I convert/identify a color?

All you really need to do is access the /id endpoint, and pass in a color value as a query string. Read the docs for more details, but all these are valid:

  • /id?hex=ffa or /id?hex=00ffa6
  • /id?rgb=rgb(255,0,0) or /id?rgb=20,43,55
  • Same goes for cmyk, hsl, and hsv formats

Every color object returned by the API:

  • Is named (from a matched dataset of over 2000 names+colors) e.g. #24B1E0 == Cerulean
  • Has an image URL for demonstration e.g. Cerulean image
  • Is transposed into hex, rgb, cmyk, hsl, hsv and XYZ formats
  • Is matched to a best-contrast color for text overlay, etc

How do I generate color schemes?

The parameters are generally the same as those necessary for the /id endpoint (supply a color, like above), but here you can also specify a scheme mode to guide the generation.

Scheme modes include monochrome, monochrome-dark, monochrome-light, analogic, complement, analogic-complement, triad and quad.

Every scheme object returned by the API is seeded by the color of your request and can be any length you specify (within limits). It will also include a color object for each constituent color.

Anything else?

If you find this open source API useful, please support the developer!