Skip to content
ColorArchive
Developer

Color API

Access all 2016 curated ColorArchive colors via a simple REST API. Free, no auth required, CORS enabled.

Base URLhttps://colorarchive.me/api
GET/api/colors

Search, filter, and paginate through 2016 colors. Supports semantic search — try queries like "sunset", "ocean", or "minimal".

Parameters

NameTypeDefaultDescription
qstring""Search by name, hex, or semantic keyword (e.g. "sunset", "ocean", "pastel")
familystring"All"Filter by color family: Red, Orange, Yellow, Lime, Green, Teal, Blue, Purple, Pink
sortstring"hue"Sort order: hue, lightness, or name
limitnumber50Max results per page (1–200)
offsetnumber0Pagination offset

Example Response

{
  "total": 280,
  "limit": 2,
  "offset": 0,
  "colors": [
    {
      "id": "teal-ink-muted",
      "name": "Teal Ink Muted",
      "hex": "#1D2A26",
      "rgb": "rgb(29, 42, 38)",
      "hsl": "hsl(160, 18%, 14%)",
      "hue": 160,
      "saturation": 18,
      "lightness": 14,
      "family": "Teal"
    },
    ...
  ]
}

Try it

GET
GET/api/colors/:id

Get a single color by its slug or hex code. Returns the full color record plus relationships (analogous, complementary, triadic, split-complementary, nearest).

Path Parameter

NameTypeDefaultDescription
idstringColor slug (e.g. "sapphire-pure-vivid") or 6-digit hex without # (e.g. "1A6BD9")

Example Response

{
  "id": "sapphire-pure-vivid",
  "name": "Sapphire Pure Vivid",
  "hex": "#1A6BD9",
  "rgb": "rgb(26, 107, 217)",
  "hsl": "hsl(210, 74%, 50%)",
  "hue": 210,
  "saturation": 74,
  "lightness": 50,
  "family": "Blue",
  "relationships": {
    "analogous": [ ... ],
    "complementary": { ... },
    "triadic": [ ... ],
    "splitComplementary": [ ... ],
    "nearest": [ ... ]
  }
}

Try it

GET

Quick Start

JavaScript / fetch
const res = await fetch("https://colorarchive.me/api/colors?q=sunset&limit=10");
const { colors } = await res.json();
console.log(colors[0].hex); // "#8B2500"
curl
curl "https://colorarchive.me/api/colors?family=Blue&sort=lightness&limit=5"

Notes

  • Responses are cached for 24 hours at the edge (CDN).
  • No authentication required. No rate limiting (be reasonable).
  • CORS is enabled for all origins.
  • All 2016 colors are generated algorithmically — the dataset is stable and deterministic.