Color Palette Extractor
The palette extractor statically fetches a page’s HTML and its linked stylesheets, parses every color declaration, resolves CSS custom properties, and returns a frequency-ranked, role-classified palette — the same engine that powers the live palettes on each website page.
Because it reads stylesheets rather than rendering the page in a headless browser, extraction is fast (typically under a second) and cheap to run.
Ways to use it
Web tool
Open /palette and paste a URL. You get the ranked color list, role groups (primary / accents / neutrals / surfaces / texts), resolved CSS variables, and — when the site ships one — a separate dark-scheme palette. Results can be copied as CSS variables or JSON.
REST API — free
GET /api/palette?url=<site-url>[&limit=24]curl "https://designmdpro.app/api/palette?url=linear.app&limit=12"- No authentication required.
urlaccepts a full URL or a bare domain.limitcaps the ranked color list (default24, max64).- Success:
{ "success": true, "data": <PaletteResult> }. Errors:{ "success": false, "error": "..." }with a400or429status. - Rate limit:
20requests/minute per IP and at most4concurrent extractions;429responses carry aRetry-Afterheader. Responses are cacheable (5 minbrowser /1 hCDN).
See REST API & Markdown for all other HTTP endpoints.
MCP tool — Pro
The same engine is exposed as extract-color-palette on the MCP server. It requires a Pro API key — see the MCP Server Reference for setup and authentication headers.
| Parameter | Type | Description |
|---|---|---|
url | string (required) | Full URL or bare domain of the page to analyze |
limit | integer, 1–64 (optional) | Max colors per scheme palette (default 24) |
The tool returns PaletteResult as structuredContent (plus a JSON text block), or isError: true with a readable message for invalid or blocked URLs.
Result shape
PaletteResult:
| Field | Description |
|---|---|
url | Final URL after redirects |
title | Page <title> |
colors | Ranked PaletteColor[] — hex, rgb, hsl, alpha, weighted count (var() references included), ranking score, roles, a per-property props histogram, variables resolving to it, schemes, and sample selectors |
groups | PaletteGroups — primary (top-ranked chromatic color), accents, neutrals, surfaces, texts, all as hex lists |
variables | Resolved PaletteVariable[] — name, hex, scope, scheme, and refs (var() usage count) |
dark | Same { colors, groups, variables } shape built only from dark-scheme declarations — null when the site ships no dark scheme |
stats | PaletteStats — stylesheets, styleTags, inlineAttrs, declarations, colorsFound, unresolvedVars, blockedResources, durationMs |
Color roles are classified as primary, accent, neutral, surface, or text.
Notes & limits
- Private, loopback, and internal addresses are blocked (SSRF protection) — both the initial URL and every discovered stylesheet are validated.
- Extraction is static: colors injected at runtime by JavaScript can’t be seen, so sites styled exclusively via JS or a CSS-in-JS runtime may return an empty palette.
limitapplies per scheme —colorsanddark.colorsare each capped separately.