What is Color Palette Extractor MCP?
Color Palette Extractor MCP is a local Node.js server with nine tools that pull a color palette from an image, separate an app's palette from its wallpaper in a screenshot, score contrast against WCAG, assign UI roles, and export the result to CSS variables, SCSS, Tailwind, Figma tokens, JSON or ASE, plus one tool that builds a themed deliverable with previews, exports and an HTML guide.
It is a local Node.js MCP server that turns an image into a usable color palette. It finds the colors, checks them against WCAG, assigns design roles, and exports the result in several formats, all without the image ever leaving the machine.
Window detection sets it apart on screenshots: an app window and the wallpaper behind it are extracted as two separate palettes instead of one blended set of colors.
What changes in an agent's output
- build_palette_folder runs the whole pipeline in one call: detect the app window, extract app and wallpaper palettes, derive the matching dark or light theme, render previews, write five export formats, and generate an HTML design-system guide with a dark/light toggle.
- brand_mode treats a clean brand sheet differently from a UI screenshot: brand exports ship as the tokens to use, with an inverted preview clearly labeled as reference only, not a recommended theme.
- score_accessibility reports WCAG AA/AAA contrast ratios between chosen palette pairs, and suggest_role assigns background, text, accent, surface or muted roles for a stated purpose.
- harmonize builds analogous, triadic, complementary, split or tetradic variants from a single seed color, and compare_palettes scores the perceptual difference between two palettes.
How the setup works
- Clone the repository and build it:
npm cithennpm run buildinside the project. - Wire the built server into an MCP client by pointing it at the compiled entry point with
node. - Set
PALETTE_OUTPUT_DIRto a fixed, writable path so deliverables land somewhere predictable instead of wherever the client happened to start from. - Optionally set
CHROME_PATHif the design-guide screenshot step should use a Chrome or Chromium binary outside the default location.
Who Color Palette Extractor MCP is for
Best for
- Turning one screenshot or brand image into a themed, exportable palette with contrast scores already checked.
- Agents that need UI roles and ready-made CSS variables, SCSS, Tailwind or Figma tokens from a single source image.
Not for
- Generating a full 50 to 950 tonal scale from one seed color instead of extracting a palette from an image, work Tailwind Shades MCP Server already does with its own tools.
- Building a brand, neutral and semantic palette system with contrast targets from scratch, a task Color System Skill handles instead of starting from an image.
- Reading colors and fonts directly from a live website rather than a saved image, a job Visual Brand Extractor Skill takes on with its own brand config output.
- Turning a screenshot into a design.md and token write-up rather than a themed, exportable palette, work AnyDesign Skill already covers end to end.
Security and requirements
- Node 18 or newer is required; CI runs on Node 18 and 22.
- image_url downloads reject private, loopback and link-local hosts, re-validate every redirect, time out after 10 seconds, and are capped at 25 MB.
- The headless-Chrome screenshot step is spawned with an argument array rather than a shell, and every dynamic value in the HTML guide is escaped before rendering.
Connect Color Palette Extractor MCP: Palettes, Themes and Tokens From an Image to your AI client
git clone https://github.com/aka-kika/color-palette-extractor-mcp.git
cd color-palette-extractor-mcp
npm ci
npm run buildClone and build
Clone the repository, then run
npm cifor a reproducible install matching CI, andnpm run build.npm testruns the 18 unit tests covering color math and the SSRF guard.Wire it into your MCP client
Add the config above (Claude Desktop or any client that accepts a
mcpServersblock), pointingargsat the absolute path to the builtdist/server.js.Set the output location
PALETTE_OUTPUT_DIRcontrols wherebuild_palette_folderwrites its deliverables. It defaults to<cwd>/output; set a fixed path when the client is always-on.Point to Chrome if needed
CHROME_PATHnames the Chrome or Chromium binary used for the design-guide screenshot. Without it, the guide is still written, just without the screenshot image.Run it locally for development
npm run devruns the server directly from source without a separate build step.
Client configuration
{"mcpServers": {"color-palette": {"command": "node", "args": ["/absolute/path/to/color-palette-extractor-mcp/dist/server.js"]}}}What you can do with it
- One-call deliverablebuild_palette_folder produces previews, five export formats, a written summary and an HTML design-system guide from a single call.
- Window-aware extractionA screenshot's app window and its wallpaper are separated into two palettes instead of one blended read.
- Brand modeTreats a clean design-system sheet as a brand palette, shipping its exports as tokens to use while labeling any inverted preview as reference only.
- WCAG contrast scoringscore_accessibility checks chosen color pairs against WCAG AA and AAA thresholds.
- Role suggestionssuggest_role assigns background, text, accent, surface or muted roles for a stated purpose.
- Multi-format exportexport_palette writes CSS variables, SCSS, Tailwind, Figma tokens, JSON or ASE from the same palette.
- Harmonize and compareharmonize builds related color schemes from one seed, and compare_palettes scores the perceptual gap between two palettes.
- Local and hardenedImage data never leaves the machine; downloads are SSRF-guarded, the screenshot step avoids a shell, and HTML guide values are escaped before rendering.
Tools it exposes
build_palette_folder
Runs the full pipeline in one call: detects the app window, extracts app and wallpaper palettes, derives the matching theme, renders previews, writes five export formats and an HTML guide, then screenshots it.
extract_palette
Pulls a palette from an image URL or path with k-means or median-cut extraction, keeping small accent colors alive with an adjustable population ratio.
extract_app_palette
Detects the app window in a screenshot and returns the foreground app palette separately from the wallpaper's palette.
score_accessibility
Scores WCAG AA/AAA contrast ratios between chosen pairs in a palette.
suggest_role
Assigns background, text, accent, surface or muted roles to palette colors for a stated purpose.
export_palette
Outputs a palette as CSS variables, SCSS, Tailwind, Figma tokens, JSON or ASE.
harmonize
Generates analogous, triadic, complementary, split or tetradic variants, or a monochrome scale, from one seed color.
match_vibe
Returns a curated palette for a mood description such as forest dusk or tokyo neon.
compare_palettes
Scores the perceptual difference between two palettes using a DeltaE2000 formula.
Frequently asked questions
What is Color Palette Extractor MCP?
It is a local Node.js MCP server that extracts a color palette from an image, checks it against WCAG contrast rules, assigns UI roles, and exports it to CSS variables, SCSS, Tailwind, Figma tokens, JSON or ASE. One tool, build_palette_folder, runs the entire pipeline from a single image in one call.
How do I install and connect it?
Clone the repository, run npm ci then npm run build, and point your MCP client's config at the built dist/server.js with the node command. npm run dev runs it directly from source for local testing without a separate build step.
Which tools does it expose?
Nine tools: build_palette_folder for the full pipeline, extract_palette and extract_app_palette for raw extraction, score_accessibility for WCAG contrast, suggest_role for UI roles, export_palette for format conversion, harmonize and match_vibe for generating related palettes, and compare_palettes for scoring the difference between two palettes.
Does it send my images anywhere?
No. Processing happens fully on the machine running the server; no image data leaves it. Downloads through image_url reject private, loopback and link-local hosts, re-validate each redirect, time out after 10 seconds, and are capped at 25 MB.
What is brand_mode for?
It tells build_palette_folder to treat the source as a clean brand or design-system sheet rather than a UI screenshot. Exports ship as the tokens to use, and an inverted preview is generated and clearly labeled as a reference only, not a recommended theme. Auto mode picks brand treatment when the image has no separate wallpaper.
How does window-aware extraction work?
extract_app_palette detects the application window inside a screenshot and returns its palette separately from the wallpaper behind it, instead of blending both into one set of colors. build_palette_folder uses the same detection as its first step.
Does a bundled agent skill ship with it?
Yes, a color-palette-mcp skill ships in the repository with an entry point describing when to use build_palette_folder, a parameter cheat sheet for brand_mode, and worked examples. It is not part of the published npm package, only the GitHub source.


