Coolors MCP

v2.0.0
io.github.x51xxx/coolors-mcp Checked 2 days ago Published 19 days ago

Color tools for AI agents: WCAG/APCA contrast, Material 3 HCT themes, palettes, DESIGN.md audits

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

describe_color

Describe what one or more colors actually look like in human perceptual terms (name, warm/cool temperature, lightness & vividness tier, OKLCH/HCT/HSL/RGB values, readable text recommendation, UI role suggestions, and visual pitfalls like bile-zone or halation). Use this whenever you cannot 'see' a hex code.

ParameterTypeDescription
colors *arrayOne or more colors to describe (hex, CSS name, rgb, hsl, oklch)

fix_contrast

Automatically find the perceptually closest color that meets a WCAG 2.x or APCA contrast target while preserving hue in HCT space. Eliminates trial-and-error guessing.

ParameterTypeDescription
background *stringBackground color
foreground *stringForeground/text color
adjuststringWhich color to adjust: 'foreground' (default), 'background', or 'auto' (whichever needs smaller ΔE2000)
preferstringDirection preference for tone adjustment
targetstringContrast target: 'aa' (4.5:1), 'aaa' (7:1), 'aa-large' (3:1), 'ui' (3:1), 'apca-body' (|Lc|≥75), 'apca-content' (|Lc|≥60), 'apca-large' (|Lc|≥45)

design_ui_palette

Design a complete, contrast-verified Light + Dark UI color system from a single brand color following the 60-30-10 rule (60% surfaces/neutrals/text hierarchy, 30% secondary & subtle containers, 10% primary CTA & interactive states + harmonized status colors). Prevents dark-mode neon halation and guarantees WCAG AA/AAA text pairs.

ParameterTypeDescription
brand *stringBrand seed color (hex, CSS name, rgb, hsl, oklch)
formatstringOutput format: markdown report + CSS, css only, json, or W3C tokens
harmonystringSecondary/accent harmony relative to brand
neutralStylestringNeutral tinting: 'tinted' (subtle brand tint, default), 'cool', 'warm', or 'pure' grayscale

audit_ui_colors

Audit an entire UI's foreground/background pairs and optional palette swatches in one call. Checks WCAG 2.x, APCA Lc, color-blindness contrast collapses, simultaneous-contrast vibration, and universally disliked colors — and provides exact hue-preserving fixes for every failing pair.

ParameterTypeDescription
pairsarrayForeground/background pairs to audit (up to 100)
swatchesarrayOptional standalone palette swatches to check for bile-zone/CVD collisions

generate_categorical_palette

Generate N perceptually balanced, color-blind-safe categorical colors for charts, badges, tags, or avatars. Optimizes minimum ΔE2000 across normal vision AND protanopia/deuteranopia/tritanopia so no category vanishes or collides.

ParameterTypeDescription
count *numberNumber of distinct categories (2-12)
backgroundstringTarget canvas polarity ('light' or 'dark')
seedColorstringOptional brand/anchor color to start the categorical spread from

convert_color

Convert colors between formats (hex, rgb, hsl, lab, hct, oklab, oklch). Accepts hex, CSS named colors, rgb(), hsl(), oklch(), oklab(), or hct().

ParameterTypeDescription
color *stringColor to convert (hex, CSS name, rgb(), hsl(), oklch(), oklab(), or hct())
to *stringTarget format

color_distance

Calculate perceptual distance between two colors using Delta E 2000

ParameterTypeDescription
color1 *stringFirst color (hex, rgb, or hsl)
color2 *stringSecond color (hex, rgb, or hsl)
metricstringDistance metric to use

check_contrast

Check contrast between two colors using WCAG 2.x luminance ratio, APCA Lc (WCAG 3 draft), or both. Also checks color-blindness contrast drops and suggests an exact hue-preserving fix if contrast fails.

ParameterTypeDescription
background *stringBackground color
foreground *stringForeground/text color
algorithmstringContrast algorithm: 'wcag' (WCAG 2.x ratio), 'apca' (Lc, WCAG 3 draft), or 'both'
suggestFixbooleanInclude nearest hue-preserving AA fix and CVD/optical warnings when issues exist

adjust_color

Adjust a color using perceptual (oklch, hct) or classic (hsl) math: lighten, darken, saturate, desaturate, hue-shift, tint (mix with white), shade (mix with black), grayscale, invert, or mix with a second color. Perceptual space ('oklch' default) prevents muddy mixes and hue drift.

ParameterTypeDescription
color *stringColor to adjust (hex, CSS name, rgb, hsl, oklch)
operation *stringAdjustment operation
amountnumberAmount of change. Percent (0-100) for lighten/darken/saturate/desaturate/tint/shade, degrees (-360..360) for hue-shift, or 0-1 weight of first color for mix. Default 10 / 30 / 0.5.
spacestringColor space for adjustment: 'oklch' (default, perceptually uniform), 'hct', or 'hsl'
withstringSecond color (only for mix)

generate_palette

Generate a color palette using color theory harmonies (monochromatic, analogous, complementary, split-complementary, triadic, tetradic, square, compound, shades-and-tints). Defaults to perceptual HCT space, avoids universally disliked colors, and describes each swatch so agents can see what was generated.

ParameterTypeDescription
baseColor *stringBase color for palette generation
allowDislikedbooleanAllow dark yellow-green 'bile zone' colors (default false)
countnumberNumber of colors to generate
includeDetailsbooleanInclude perceptual name, temperature, tone, and best text ink for each swatch
spacestringWheel space: 'hct' (perceptual default), 'oklch' (CSS perceptual), 'ryb' (painter's red-yellow-blue wheel), or 'hsl'
typestringType of color harmony

generate_palette_with_locks

Generate a color palette while preserving specific locked colors. Uses deterministic perceptual search in OKLCH/HCT/LAB/HSL and avoids universally disliked colors.

ParameterTypeDescription
lockedColors *arrayColors that must be included in the palette
totalColors *numberTotal number of colors in the final palette
colorSpacestringColor space for palette generation/interpolation (oklch/hct/lab are perceptually uniform)
modestringGeneration mode: harmony (cohesive), contrast (distinct), or gradient (smooth transition)

generate_gradient

Generate a smooth gradient between colors with multiple interpolation methods (oklch, oklab, lab, lch, hct, hsl, rgb)

ParameterTypeDescription
colors *arrayColors to create gradient between (2-32)
steps *numberTotal number of colors in the gradient, including every input color (must be ≥ number of colors)
easingstringEasing function for gradient transition
formatstringOutput format for the gradient
interpolationstringColor space for interpolation (oklch/oklab/lab/lch/hct are perceptually smooth)

export_palette

Export a list of colors as CSS custom properties, SCSS variables, a Tailwind config snippet, W3C design tokens, JSON, or a DESIGN.md `colors:` block.

ParameterTypeDescription
colors *arrayPalette colors (up to 256)
format *stringOutput format: css (custom properties), scss (variables), tailwind (config), tokens (W3C design tokens), json, design-md (DESIGN.md `colors:` YAML for the front matter)
namesarrayOptional names for each color. Length must match colors. Defaults to a 50/100…900 scale.
prefixstringOptional prefix for variable/token names (e.g. 'brand')

simulate_color_blindness

Simulate how one or more colors appear to viewers with color vision deficiency (protanopia, deuteranopia, tritanopia, their milder anomaly forms, or achromatopsia).

ParameterTypeDescription
colors *arrayColors to simulate (hex, rgb, hsl), up to 64
typesarrayDeficiency types to simulate. Defaults to all 7 (dichromacy + anomaly + achromatopsia).

check_palette_accessibility

Audit a color palette for color-blind accessibility. For each pair of colors, reports the perceptual distance (Delta E 2000) under each CVD type and flags pairs that become indistinguishable.

ParameterTypeDescription
colors *arrayPalette colors to audit (2-64)
indistinguishableThresholdnumberΔE2000 below which two simulated colors are considered indistinguishable (default 10)
typesarrayCVD types to audit. Defaults to all 7.

generate_tonal_scale

Generate a complete tonal scale (Tailwind-style 50/100/.../900/950) from a seed color. Uses Google's HCT color space so each step is perceptually even — ideal for building shadable design-system colors.

ParameterTypeDescription
seed *stringSeed color (hex, rgb, hsl)
chromaBoostnumberMultiplier on seed chroma (1 = preserve, <1 = muted)
namestringCSS variable base name (default: 'color')
stopsarrayCustom stops. Default: [50,100,200,300,400,500,600,700,800,900,950].

generate_state_colors

Generate consistent interaction-state colors (hover / active / pressed / focus / disabled / selected) from a base color. Steps are computed in HCT space so they keep equal perceptual weight regardless of base hue.

ParameterTypeDescription
base *stringBase/resting color (hex, rgb, hsl)
isDarkbooleanWhether the base color sits on a dark background. Hover lightens on dark, darkens on light.

analyze_palette_consistency

Score how visually cohesive a palette is. Reports tonal step uniformity, chroma spread, hue distribution, and a single 0-100 cohesion score, plus targeted suggestions for tightening it up.

ParameterTypeDescription
colors *arrayPalette colors to analyze (2-64)

generate_semantic_palette

From a single brand color, generate a complete visually-cohesive semantic palette: primary, secondary, tertiary, plus success/warning/error/info status colors. Tone and chroma are normalized in HCT space so every color feels like part of the same family.

ParameterTypeDescription
brand *stringBrand / seed color (hex, rgb, hsl)
isDarkbooleanGenerate the palette for a dark theme background

generate_material_theme

Generate a complete Material Design 3 color theme from a source color

ParameterTypeDescription
sourceColor *stringSource color for theme generation
includeCustomColorsbooleanInclude custom color palettes

harmonize_colors

Harmonize colors to work better together using Material Design algorithms

ParameterTypeDescription
colors *arrayArray of colors to harmonize
factornumberHarmonization strength (0-1)
methodstringHarmonization method

generate_tonal_palette

Generate a Material Design tonal palette from a color

ParameterTypeDescription
color *stringBase color for palette
tonesarrayCustom tone values 0-100 (default: Material standard tones)

match_theme_color

Find the closest matching theme variable for a given color

ParameterTypeDescription
color *stringColor to match (hex, rgb, hsl)
themeCSS *stringCSS containing theme variables
contextstringUsage context for better matching
minConfidencenumberMinimum confidence threshold (0-100)

refactor_css_with_theme

Refactor CSS to use theme variables instead of hardcoded colors

ParameterTypeDescription
css *stringCSS content to refactor
themeCSS *stringCSS containing theme variables
generateReportbooleanGenerate detailed refactoring report
minConfidencenumberMinimum confidence for replacements
preserveOriginalbooleanKeep original values as comments

match_theme_colors_batch

Find theme matches for multiple colors at once

ParameterTypeDescription
colors *arrayArray of colors to match
themeCSS *stringCSS containing theme variables
contextstringUsage context for all colors

generate_theme_css

Generate CSS custom properties for a complete theme from a source color

ParameterTypeDescription
sourceColor *stringSource color for theme generation
includeTonesarrayTone values to include (default: 0,10,20,30,40,50,60,70,80,90,95,99,100)
prefixstringPrefix for CSS variables (e.g., 'color' → --color-primary-50)

extract_image_colors

Extract dominant colors from an image. Input should be image data as an array of RGBA values.

ParameterTypeDescription
imageData *objectImage data with RGBA values (at most 65536 pixels; downscale larger images)
formatstringOutput format
maxColorsintegerMaximum number of colors to extract
qualitystringExtraction quality

generate_theme_from_image

Generate a complete Material Design 3 theme from an image

ParameterTypeDescription
imageData *objectImage data with RGBA values (at most 65536 pixels; downscale larger images)
includeCustomColorsbooleanInclude custom colors from image
isDarkbooleanGenerate dark theme (false for light theme)

audit_design_md

Audit the color tokens of a DESIGN.md file (Google Labs design-system format: YAML front matter / ```yaml blocks with `colors` and `components`). Checks WCAG + APCA contrast for pairs declared in components (backgroundColor/textColor) and pairs inferred from token names (on-X ↔ X, text ↔ surface), color-blind collisions between accent/status colors, exact and near-duplicate tokens, disliked colors, broken {colors.x} references and a missing `primary`. Suggests same-hue fixes for failing pairs. Pass the file's full text.

ParameterTypeDescription
designMd *stringFull text of the DESIGN.md file
cvdThresholdnumberΔE2000 below which two accent/status colors count as indistinguishable under color-vision deficiency
maxItemsintegerMaximum rows listed per report section
textThresholdnumberMinimum WCAG contrast for text pairs (4.5 = AA normal text, 7 = AAA)

analyze_color_likability

Check if a color is universally disliked (dark yellow-green associated with biological waste) and get a fixed version if needed

ParameterTypeDescription
color *stringColor to analyze (hex, rgb, hsl, etc.)
autoFixbooleanAutomatically return fixed version if disliked

fix_disliked_colors_batch

Analyze and fix multiple colors, returning only liked versions

ParameterTypeDescription
colors *arrayArray of colors to analyze (hex, rgb, hsl, etc.), up to 100
includeAnalysisbooleanInclude detailed analysis for each color