Colors MCP Server
Exact color math, accessibility checking and palette generation for AI agents — pure computation, no network or side effects.
Check contrast: WCAG AA/AAA pass/fail for one or many text/background pairs (normal, large or UI), with exact ratio, signed APCA Lc, and a nearby passing color for failures.
Fix contrast: get the closest same-hue color that reaches a target ratio on a fixed background.
Build palettes: 11-step tonal ramps, light/dark UI theme tokens with every contrast rule verified, color-blind-safe categorical chart colors, and diverging scales.
Find colors by rules: hue band, chroma/lightness ranges, contrast against multiple surfaces, plus lightness-gap, hue-gap or ΔE separation (optionally color-blind safe) — or say which rule can't be met.
Size a scrim: smallest overlay opacity for legible text over the worst-case regions of an image.
Audit CSS: flag text contrast, non-text contrast and near-duplicate tokens, resolving
var(--x).Validate/describe colors: formats, closest CSS name, lightness, sRGB fit, contrast on white and black.
Convert spaces: hex, rgb, hsl, hwb, hsv, oklch, oklab, lab/lch (D50 and D65), xyz, linear sRGB, display-p3 and rec2020 variants; out-of-gamut colors lose chroma only and say so.
Compare colors: CIEDE2000 (default), CIE94, CIE76, Oklab, or all at once, with a ranking and verdict.
Blend/gradient: even steps or a single mix in OKLCH, OKLab, sRGB or linear sRGB.
Adjust colors: change lightness, chroma or hue by exact OKLCH amounts (add, multiply or set).
Harmony schemes: complementary, split-complementary, triadic, tetradic, analogous by OKLCH hue rotation.
Simulate color blindness: protanopia, deuteranopia, tritanopia, achromatopsia, and measure whether a set stays distinguishable.
Agent support: server routing instructions, field guides (
colors://guide/{topic}), prompts (review-colors,brand-color-system,fix-accessibility), an Agent Skill, a visual MCP App viewer, and structured output for every tool.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Colors MCP Server Convert #FF5733 to HSL"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Colors MCP Server
Exact color math, accessibility checks and ready-made palettes for AI agents.
Built entirely by AI agents. Every line of code, test, benchmark and document here was written by AI agents. The maintainer is not a domain expert in color theory and has not checked the color math by hand. Correctness rests on published formulas, cross-checks against Color.js, and the benchmark results below, not on expert review. Report any error you find.
On this page: Why · Example · Install · Tools · Agent guidance · Benchmarks · Reference
Why
Small and mid-size models cannot compute contrast ratios, OKLCH conversions, gamut mapping or color-blind simulation in their heads. They guess, or they run out of output tokens trying. This server does the math in one tool call and returns a verified answer.
Covers: UI and web design, design systems, data visualization, print, video, photo and games.
Pure computation: no network, no files, no side effects.
Built for small models: one list-shaped input per tool, flat forgiving schemas, errors that say how to fix the call.
Related MCP server: MCP Color Converter
Example
An agent asks for an outcome and gets a finished result. Every result starts with the verdict.
colors_check {"foreground":"#777777","background":"#ffffff"}
→ FAIL: 4.48:1, needs 4.5:1 for WCAG AA normal text.
Passing alternative text color: #767676
colors_fix {"foreground":"#777777","background":"#ffffff"}
→ Use #767676 (was #777777). Contrast on #ffffff is 4.54:1, up from 4.48:1; target 4.5:1 met.
colors_palette {"kind":"categorical","count":4}
→ 4 categorical colors for #ffffff background, each at least 3:1 against it:
#e556f3, #003905, #36aa3d, #460062
Weakest pair difference (CIEDE2000; higher is better): normal 38.2, protanopia 36.5, deuteranopia 36.6, tritanopia 36.1.Hosts that support MCP Apps also show the result visually:
Contrast check | Light and dark theme |
|
|

Install
Needs Node 20 or newer. Run it directly:
npx -y @htetoowaiyan/colors-mcp-serverOr add it to your client:
Claude Code
claude mcp add colors -- npx -y @htetoowaiyan/colors-mcp-serverClaude Desktop, Cursor and most other clients (mcpServers in the client's config file)
{
"mcpServers": {
"colors": { "command": "npx", "args": ["-y", "@htetoowaiyan/colors-mcp-server"] }
}
}VS Code (.vscode/mcp.json)
{
"servers": {
"colors": { "command": "npx", "args": ["-y", "@htetoowaiyan/colors-mcp-server"] }
}
}Codex (~/.codex/config.toml)
[mcp_servers.colors]
command = "npx"
args = ["-y", "@htetoowaiyan/colors-mcp-server"]Tools
Thirteen tools. Every tool also returns structuredContent with a declared outputSchema.
Finished answers
Ask for an outcome, get a result.
Tool | Use it to |
| Pass or fail WCAG 2 contrast for one or many pairs (AA or AAA; normal text, large text or UI parts). Also reports the signed APCA Lc (positive dark-on-light, negative light-on-dark) and a nearby passing color for each failure. Handles translucent colors. |
| Get the closest color with the same hue that reaches a target ratio on a given background. |
| Build a finished palette: |
| Find colors that meet your rules in one call: hue band, chroma and lightness ranges, contrast against one or more surfaces, and for several colors a minimum lightness gap, hue gap or color difference (optionally color-blind safe). Says which rule cannot be met when none can. |
| Find the smallest overlay opacity at which text reaches a contrast ratio on every worst-case region of an image. |
| Scan CSS for text contrast, non-text contrast and near-duplicate tokens. Resolves |
Exact helpers
Precise building blocks for work the finished tools do not cover.
Tool | Use it to |
| Validate colors and describe them: formats, closest name, lightness, contrast on white and black. A bad input gets a suggestion. |
| Convert between color spaces (see the list below). A color outside sRGB loses chroma only, and the result says so. |
| Rank candidates by CIEDE2000 (default), CIE94, CIE76 or Oklab distance, or report all four at once (D65 Lab), with a plain-words verdict. |
| Build gradients and mixes in OKLCH (shorter hue arc, safe for grays), OKLab, sRGB or linear-light sRGB. |
| Change lightness, chroma or hue by an exact OKLCH amount (add, multiply or set). |
| Build complementary, split-complementary, triadic, tetradic and analogous schemes by OKLCH hue rotation. |
| Simulate protanopia, deuteranopia, tritanopia and achromatopsia (Machado 2009), and measure whether a set of colors stays distinguishable. |
Formats read and written by colors_convert
All of these are accepted as input too.
Family | Formats |
sRGB | hex, rgb, hsl, hwb, hsv (also |
Perceptual | oklch, oklab |
CIELAB | CSS |
CIE XYZ | xyz (D65) |
Wide gamut | display-p3, |
CMYK output is missing on purpose: an accurate RGB-to-CMYK conversion needs the press's ICC profile, and a formula would mislead. The print guide says what to do instead.
Agent guidance
Besides the tools, the server gives the model some help to use them well.
What | Where | Purpose |
Server instructions | sent on connect | A short routing guide so a model calls the tools instead of guessing. |
Guides |
| Field guides for |
Prompts |
| Ready-made starting points. |
Agent Skill |
| The guides as references. |
MCP App |
| Visual result viewer. One self-contained file, no network access. |
Benchmarks
The evals/ package measures whether the server helps. A grader built from hand-written color math marks each answer pass or fail. Each task runs twice per model, with and without the server, and tool results reach the model as text only. Models: Haiku 5.5 and GPT-6 Luna.
Versus other color MCP servers
The test is the neutral suite, version 3: 60 tasks in 12 color domains (APCA contrast, ΔE, space conversion, color properties, color-blind simulation, interpolation, harmony, naming, tonal scales, role tokens, constraint search, palette audit).
How it was kept fair:
Authors wrote the tasks blind, with no sight of any server's tools. Prompts name the standard to use (APCA-W3, CIEDE2000 D65, Machado 2009, CSS Color 4, WCAG 2, BT.2020).
Graders accept any correct implementation.
An independent solver re-solved all 60 using only Color.js.
The suite was frozen before any server ran, and it was written after the last change to this server. Nothing was tuned on it.
Result (mean pass rate over both models; 240 runs per row):
Server | Pass rate | This server minus it [95% interval] |
This server (2.1.0) | 62% | |
color-theory-mcp | 46% | +0.17 [0.07, 0.27] |
color-engine-mcp | 36% | +0.26 [0.15, 0.38] |
mcp-color-convert | 23% | +0.39 [0.29, 0.50] |
coolors-mcp | 19% | +0.43 [0.32, 0.54] |
No tools | 16% |
How to read it:
The lead over every server is clear: every interval excludes zero.
Only this server and color-theory-mcp help by a wide margin. coolors-mcp and mcp-color-convert cannot be told apart from no tools.
Gain over no tools for this server: +0.55 for Haiku, +0.38 for GPT-6 Luna.
The interval comes from resampling tasks (paired, per task).
Version 3 is harder than version 2 (no tools drops from 25% to 16%), so compare ranks and paired differences, not the absolute rate.
By capability (pass rate, both models):
Server | Measurement and lookup | Simulation, interpolation, harmony | Design-system generation | Constraint search and audit |
This server | 60% | 72% | 45% | 73% |
color-theory-mcp | 33% | 70% | 30% | 58% |
color-engine-mcp | 37% | 42% | 15% | 48% |
mcp-color-convert | 19% | 43% | 3% | 25% |
coolors-mcp | 15% | 30% | 8% | 25% |
No tools | 13% | 15% | 15% | 25% |
Where this server is weakest: APCA contrast (40%), delta-E (40%) and role tokens (30%). A large part is the small models hitting their step or token limit before answering, and GPT-6 Luna doing delta-E arithmetic by hand instead of calling colors_compare. color-engine-mcp beats this server on APCA (70%).
Server instructions made no measurable difference (65% with them, −0.03 [−0.08, 0.03]).
Servers tested: coolors-mcp 1.1.0, mcp-color-convert 0.1.3, color-theory-mcp (commit 95085b9), color-engine-mcp 1.0.1.
History. The first neutral suite showed a much smaller lead over color-theory-mcp (+0.05, not established) and exposed real gaps: APCA was computed but not shown, and standard color spaces and ΔE variants were missing. Those were fixed, and the later suites were written afterwards. Reports for every suite: evals/results/reports/. The v3 report is neutral-v3-final-2026-11-12.md.
This server against its own earlier versions
Written from designer briefs by an author who never saw the tools or any results: picking colors under several rules, the smallest scrim over a photo, one color for light and dark surfaces, alpha compositing and color-mix() arithmetic, grayscale-safe chart colors, diverging scales, gradient-text legibility and video Y'CbCr conversion. Each task ran once per server version; the report shows totals only.
Model | No tools | 2.0 server | Current server |
Haiku 5.5 | 53% | 86% | 95% |
GPT-6 Luna | 52% | 61% | 77% |
The current server beats no tools by +0.34 [0.17, 0.50], and beats 2.0 (which had no colors_find, colors_scrim or diverging palette) by +0.12 [0.02, 0.22].
Contrast fixes, gradients, tonal ramps, light and dark themes, CSS audits, color-blind-safe chart colors and more. The tasks and the first tools cover the same categories, so this suite shows that the tools cover it, not that they generalize. Pass rate on its 42 development tasks:
Model | No tools | 1.x server | Current server |
Haiku 5.5 | 38% | 79% | 96% |
GPT-6 Luna | 48% | 61% | 99% |
The 14 held-out tasks were last run against the 2.0 server: both models passed all 14, against 32% and 46% without tools. The current server did not re-run them.
Limits of these numbers
GPT-6 Luna gains less than Haiku. The remaining misses are mostly arithmetic the tools do not cover, such as compositing and Y'CbCr.
The tool list is about 18,000 characters, so each run uses roughly 17% to 21% more input tokens.
Only two small models, two trials and five tasks per category, so per-category figures are descriptive only.
The 12 neutral domains were chosen from what the compared servers advertise; eight of the twelve favour servers built from small primitive tools.
The authors' session context included recent commit messages naming the new capabilities. They were told to ignore them, but a small leak cannot be ruled out.
Print, photo and game work have guides but no benchmark tasks.
Suites that informed a fix are no longer fair tests of that fix. Only the sealed suite and neutral v3 are.
Method and commands: evals/README.md.
Reference
Protocol support
The server uses the stable v2 SDK (@modelcontextprotocol/server) and serveStdio, so one process speaks both protocol eras:
2026-07-28: stateless, with
server/discover,resultType, cache hints on list results and resources, and a fixed tool order.2025-11-25 and earlier: the
initializehandshake, for clients that have not upgraded.
Migrating from 1.x
2.0.0 replaced the tool surface.
1.x | 2.x |
|
|
|
|
|
|
|
|
|
|
|
|
New in 2.x: colors_fix, colors_palette, colors_find, colors_scrim, colors_audit, colors_harmony and colors_vision. The color engine moved from culori to Color.js, plus hand-written math for CIEDE2000, gamut mapping and color-blind simulation, checked against published test vectors.
Development
npm install
npm test # unit and integration tests (both protocol eras in memory) plus a real stdio process
npm run lint
npm run build:ui # rebuild the viewer into src/ui/viewer.generated.ts (committed)
npm run build
npm run inspect # open the MCP InspectorTo run the evals (they call models through a local inference proxy; setup is in evals/README.md):
cd evals && npm ci
npm test
npm run cli -- preflight --server-ref working-tree --cases v2
npm run cli -- run --run-id v2 --server-ref working-treeLicense
MIT
Available Tools
13 toolscolors_adjustAdjust colorsARead-onlyIdempotent
Make colors lighter, darker, more or less colorful, or rotate the hue, by exact OKLCH amounts. Changes only the property you name; the result is always a valid sRGB hex (chroma is lowered if the color would leave the gamut). Examples: {property:"lightness",mode:"add",amount:-0.1}; {property:"hue",mode:"add",amount:40}; {property:"chroma",mode:"multiply",amount:0.6}.
Inputs: amount (required), colors (required), property (required), mode. Returns: results
colors_auditAudit CSS colorsARead-onlyIdempotent
Scan CSS for color problems and return exact findings: "text-contrast-aa" (color on background below 4.5:1), "nontext-contrast-3" (border-color on background below 3:1) and "near-duplicate-token" (two :root custom-property colors almost identical, ΔE00 under 2). Resolves var(--x) from :root. Use for any stylesheet or design review.
Inputs: css (required). Returns: checked, findings, problems
colors_blendBlend or build a gradientARead-onlyIdempotent
Mix colors or build a gradient between 2+ colors. Returns evenly spaced hex colors with both endpoints included, interpolated in OKLCH so midpoints stay clean (no gray mud). Set at for one mixed color (0.5 = even mix). Always in sRGB gamut.
Inputs: colors (required), at, space, steps. Returns: space, colors
colors_checkCheck contrastARead-onlyIdempotent
Check WCAG 2 contrast for text/background color pairs and say PASS or FAIL for each, with the exact ratio and, for failures, a nearby passing color. Also gives the signed APCA Lc (APCA-W3 0.98G-4g: positive for dark text on light, negative for light on dark). Use whenever you must know if colors are readable or accessible. Handles translucent colors. Pass foreground+background, or pairs for many.
Inputs: base, size, level, pairs, +2 more. Returns: size, level, allPass, results, +1 more
colors_compareCompare colorsARead-onlyIdempotent
Measure how different colors look from a reference: CIEDE2000 (ΔE00, default), CIE94, CIE76 or Oklab distance, or all of them at once. Returns the nearest candidate and a full ranking, closest first. Use for 'which color is closest', 'are these the same color', or matching to a palette. Under 1 is not noticeable; over 10 is very different.
Inputs: color (required), candidates (required), metric. Returns: metric, nearest, ranking
colors_convertConvert colorsARead-onlyIdempotent
Convert colors to another format: hex, rgb, hsl, hwb, hsv, oklch, oklab, CSS lab/lch (D50), lab-d65/lch-d65 (CIELAB, D65, no adaptation), xyz (D65), linear (linear sRGB), p3, rec2020 (CSS, 2.4 gamma), rec2020-oetf (BT.2020 transfer) or rec2020-linear. Reads any of them as input. Handles lists. A color outside sRGB (for hex/rgb/hsl/hwb) is mapped in by lowering chroma only, and the result says so.
Inputs: to (required), colors (required), precision. Returns: to, results
colors_findFind colors that meet rulesARead-onlyIdempotent
Find colors that satisfy your rules in one call. Combine any of: hue band (or the hue family of a color), chroma range, lightness range, contrast against one or more backgrounds (against), and for several colors a minimum lightness gap, hue gap or color difference (optionally color-blind safe). Returns verified hex colors with the most margin, or says which rule cannot be met.
Inputs: cvd, count, hueOf, hueMax, +10 more. Returns: found, pairs, colors, details, +1 more
colors_fixFix contrastARead-onlyIdempotent
Make a text color readable: returns the closest color (same hue) that reaches the target contrast ratio on the given background. Use after a contrast check fails, or to pick an accessible text color. The background stays fixed. Returns one hex color and its verified ratio.
Inputs: background (required), foreground (required), target, keepHue. Returns: color, found, ratio, target, +2 more
colors_harmonyColor harmonyARead-onlyIdempotent
Generate a color scheme from a base color by rotating its OKLCH hue (complementary, split-complementary, triadic, tetradic, analogous) while keeping lightness and chroma matched. Returns hex colors with their hue offsets; the base is included at offset 0. OKLCH hue steps look even, unlike HSL angles.
Inputs: color (required), scheme (required). Returns: colors, scheme
colors_infoDescribe or validate colorsARead-onlyIdempotent
Validate color strings and describe each: hex, rgb, hsl, oklch, closest CSS name, how light it is, whether it fits sRGB, and contrast against white and black (so you can pick black or white text). Use to check that an input is a real color, or to understand an unfamiliar color. Bad inputs are reported per color, with a suggestion.
Inputs: colors (required). Returns: results
colors_paletteBuild a paletteARead-onlyIdempotent
Build a finished color palette with verified accessibility. kind "ramp": an 11-step tonal scale of a color (lightest to darkest, the seed is one step, evenly spaced). kind "theme": light and dark UI tokens (background, surface, surface-raised, text, text-muted, border, primary, on-primary) from a brand color, with every text contrast rule checked. kind "categorical": N clearly different, color-blind-safe colors for charts. kind "diverging": a scale from color through a light neutral to color2, with symmetric lightness. Returns hex values ready to use.
Inputs: kind (required), cvd, color, count, +3 more. Returns: kind, names, theme, colors, +4 more
colors_scrimSmallest overlay for legible text on an imageARead-onlyIdempotent
Text over a photo: find the smallest overlay (scrim) opacity at which the text reaches a contrast ratio on every worst-case region of the image. Painted like CSS, on 8-bit channels. Returns the opacity and the ratio on each region.
Inputs: text (required), overlay (required), regions (required), step, +1 more. Returns: found, ratios, opacity
colors_visionColor blindness simulationARead-onlyIdempotent
Simulate how colors look with color blindness (Machado 2009 model) and, for 2+ colors, measure whether the set stays distinguishable: returns the weakest pair per vision type. Use to check chart or status colors, or to find out if red/green pairs will collide. To BUILD a color-blind-safe set use colors_palette with kind "categorical".
Inputs: colors (required), type, minDifference. Returns: separation, simulations, allDistinguishable
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool has a clearly stated niche: search, check, fix, palette, scrim, audit, info, convert, compare, blend, adjust, harmony, vision. A few boundaries are soft — colors_find with contrast rules overlaps colors_fix, and colors_palette ramps overlap colors_blend/colors_adjust — but descriptions explicitly route those cases (e.g. vision says use colors_palette to build CVD-safe sets).
Every tool uses the identical colors_<verb> single-token pattern with a strong, distinct verb (find, check, fix, audit, convert, compare, blend, adjust). No casing or style deviations anywhere in the set.
13 tools sit squarely in the well-scoped 3-15 range and each maps to a genuinely different color task (accessibility, conversion, manipulation, generation, auditing). Nothing feels redundant enough to drop, and no obvious task type is missing a slot.
The surface covers the full lifecycle: parse/describe, convert, measure difference, manipulate, generate (harmony, palette, blend), verify accessibility (check, fix, scrim, audit, vision). Minor gaps remain, such as extracting a palette from an image/logo or exporting palettes as design-token files, but agents can compose around these.
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Official remote MCP server for Color Me Shop.
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Official IPinfo MCP Server - IP intelligence tools for AI assistants
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides color conversion between multiple color spaces including RGB, RGBA, HEX, HSL, OKLCH, LAB, and CMYK.547 npm2MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive toolkit for color conversion, manipulation, and accessibility analysis supporting formats like OkLCH and WCAG compliance. It enables AI agents to manage design systems by generating harmonious palettes, transforming color spaces, and performing contrast checks.2MIT
- AlicenseNot gradedqualityBmaintenanceWraps thecolorapi.com to provide color data and information through MCP, with no authentication required.107 npmMIT

@mate-tools/mcp-serverofficial
AlicenseAqualityDmaintenanceMCP server providing 35 utility tools for AI agents including text analysis, encoding, hashing, password generation, JSON/CSV/XML parsing, regex, color, date, finance, URL metadata, SEO tags, DNS lookup, SSL inspection, and JWT decoding. Free, zero-dependency, and works with any MCP client.3564 npmMIT

