Skip to main content
Glama
Color Theory MCP Server

Color Theory MCP Server

Color Theory MCP Server

npm version npm downloads License: MIT Node.js Version CI TypeScript

A comprehensive MCP (Model Context Protocol) server providing 24 tools for color theory operations including color space conversions, harmony generation, accessibility validation, and cultural meaning lookup.

Table of Contents

Related MCP server: MCP Color Converter

Features

  • 15 Color Spaces: sRGB, Linear sRGB, Display P3, XYZ-D65, XYZ-D50, Lab, LCH, Oklab, Oklch, HSL, HSV, HWB, CMYK, CAM16, HCT

  • 12 Blend Modes: Multiply, Screen, Overlay, Soft-light, Color-burn, Subtractive (Pigment), etc.

  • Advanced Accessibility: APCA (Lc), Daltonization (CVD Correction), WCAG 2.2 Non-text

  • Production Exports: Design tokens for iOS Swift, Android XML, SCSS, Figma JSON, Tailwind

  • 7 Harmony Algorithms: Complementary, Analogous, Triadic, Split-complementary, Tetradic, Square, Monochromatic

  • Color Vision Deficiency: Simulation & Correction for protanopia, deuteranopia, tritanopia

  • Delta-E Calculations: CIE76, CIE94, CIEDE2000 perceptual difference formulas

  • 147 CSS Named Colors: Lookup and closest match finding

  • Cultural Meanings: Color associations across Western, East Asian, South Asian, and Middle Eastern cultures

Installation

npm install color-theory-mcp

Or install from source:

git clone https://github.com/JoshuaRamirez/color-theory-mcp.git
cd color-theory-mcp
npm install
npm run build

Quick Start

Get up and running in under a minute:

  1. Install the package:

    npm install color-theory-mcp
  2. Add to your Claude Code MCP settings (see Usage for details):

    {
      "mcpServers": {
        "color-theory": {
          "command": "node",
          "args": ["node_modules/color-theory-mcp/dist/index.js"]
        }
      }
    }
  3. Start using color tools:

    "Convert #FF5733 to Oklch" -> Use convert-color
    "Is this text accessible?" -> Use validate-wcag-contrast
    "Generate a triadic palette from blue" -> Use generate-harmony

Usage

With Claude Code

Add to your Claude Code MCP settings:

{
  "mcpServers": {
    "color-theory": {
      "command": "node",
      "args": ["/path/to/color-theory-mcp/dist/index.js"]
    }
  }
}

Development

npm run dev      # Run with tsx (development)
npm run build    # Build TypeScript
npm run test     # Run tests

Tools

Query Tools (4)

  • get-color-info - Comprehensive color information

  • get-color-name - Find closest CSS named color

  • get-color-meaning - Cultural/psychological meanings

  • list-named-colors - List CSS named colors

Convert Tools (3)

  • convert-color - Convert to any color space (15+ supported)

  • convert-batch - Convert multiple colors

  • parse-color-string - Parse CSS Color 4 formats (oklch, lab, hwb, etc.)

Calculate Tools (5)

  • calculate-contrast - WCAG/APCA contrast ratio

  • calculate-delta-e - Perceptual difference (CIE76/94/2000)

  • calculate-luminance - Relative luminance

  • mix-colors - Blend/Mix colors (Blend modes, Subtractive)

  • adjust-color - Lighten/darken/saturate/rotate hue

Generate Tools (6)

  • generate-harmony - Color wheel harmonies

  • generate-palette - Design system palette (HCT/Material)

  • generate-gradient - Multi-stop gradients with easing

  • generate-accessible-palette - WCAG/APCA-compliant alternatives

  • generate-design-tokens - iOS, Android, SCSS, Figma JSON

  • generate-scale - Tailwind-style 50-950 scale

Validate Tools (5)

  • validate-wcag-contrast - WCAG 2.2 & APCA checks

  • validate-color-blindness - CVD simulation & Daltonization

  • validate-gamut - In-gamut verification & perceptual mapping

  • validate-print-safe - CMYK feasibility

  • validate-palette-harmony - Harmony analysis

Examples

Check accessibility

"Is #333333 on #FFFFFF WCAG AA compliant?"
→ Use validate-wcag-contrast

Generate a palette

"Generate a 5-color analogous harmony from navy blue"
→ Use generate-harmony with harmonyType: "analogous"

Simulate color blindness

"How does this palette look to someone with deuteranopia?"
→ Use validate-color-blindness with cvdType: "deuteranopia"

Convert color spaces

"Convert #FF5733 to Oklch"
→ Use convert-color with targetSpace: "oklch"

Architecture

src/
├── domain/           # Value objects & interfaces
│   ├── values/       # Color, Palette, Gradient, Matrix3x3
│   └── interfaces/   # IColorSpace, IHarmonyAlgorithm, etc.
├── color-spaces/     # Color space implementations
├── services/         # ConversionService, ContrastService, PaletteService
├── strategies/       # Delta-E, CVD, Harmony algorithms
├── data/             # CSS colors, cultural meanings
└── mcp/tools/        # MCP tool implementations

Contributing

We welcome contributions! Please see our Contributing Guide for details on:

  • Code of conduct

  • Development setup

  • Submitting pull requests

  • Coding standards

For a history of changes, see the Changelog.

References

Getting Help

License

MIT - see LICENSE for details.

Available Tools

27 tools
adjust-colorB

Adjust a color by lightening, darkening, saturating, desaturating, or rotating hue

Inputs: color (required), darken, rotate, lighten, +2 more.

calculate-apca-contrastB

Calculate APCA (WCAG 3.0) perceptual lightness contrast between text and background colors

Inputs: textColor (required), backgroundColor (required).

calculate-contrastC

Calculate WCAG 2.x contrast ratio between two colors

Inputs: background (required), foreground (required).

calculate-delta-eC

Calculate perceptual color difference (Delta-E) between two colors

Inputs: color1 (required), color2 (required), kC, kH, +2 more.

calculate-luminanceC

Calculate the relative luminance of a color

Inputs: color (required).

calculate-temperatureB

Convert between color temperature (Kelvin) and color, or estimate a color's temperature

Inputs: color, kelvin.

convert-batchB

Convert multiple colors to a target color space at once

Inputs: colors (required), targetSpace (required).

convert-colorB

Convert a color to a different color space (sRGB, Lab, Oklch, HSL, CMYK, Rec2020, ProPhoto, ACEScg, etc.)

Inputs: color (required), targetSpace (required).

generate-accessible-paletteB

Generate WCAG-compliant versions of colors for a given background

Inputs: colors (required), backgroundColor (required), level.

generate-accessible-reportB

Comprehensive accessibility audit: WCAG, APCA, color blindness simulation, and pairwise distinguishability

Inputs: colors (required), backgroundColor (required), includeCVD, includeAPCA.

generate-design-tokensC

Export colors as W3C Design Tokens, CSS custom properties, or Tailwind config

Inputs: colors (required), format, prefix.

generate-gradientB

Generate a smooth color gradient between two or more colors with configurable interpolation space

Inputs: steps, colors, endColor, includeCSS, +2 more.

generate-harmonyC

Generate a color harmony palette (complementary, analogous, triadic, etc.)

Inputs: baseColor (required), harmonyType (required), count, angleSpread.

generate-paletteC

Generate a complete design system palette from a base color

Inputs: baseColor (required), style, includeNeutrals.

generate-scaleC

Generate a Tailwind-style color scale (50-950) from a base color

Inputs: baseColor (required), steps.

generate-themeB

Generate a Material Design 3 theme with light/dark modes from a seed color

Inputs: seedColor (required), mode.

get-color-infoB

Get comprehensive information about a color including all formats, perceptual values, and analysis

Inputs: color (required).

get-color-meaningC

Get cultural and psychological meanings of a color across 7 cultural regions

Inputs: color (required), region, context.

get-color-nameB

Find the closest CSS named color to a given color value

Inputs: color (required), includeAlternatives.

list-named-colorsB

List CSS named colors with optional filtering

Inputs: limit, search.

mix-colorsB

Mix two colors together with optional gradient generation

Inputs: color1 (required), color2 (required), ratio, steps.

parse-color-stringB

Parse any CSS color string and return normalized values

Inputs: color (required).

validate-color-blindnessB

Simulate how colors appear to people with color vision deficiencies

Inputs: colors (required), cvdType, severity.

validate-gamutB

Check if a color is within a specific color space gamut

Inputs: color (required), targetGamut.

validate-palette-harmonyC

Analyze a palette for color harmony and distinguishability

Inputs: colors (required).

validate-print-safeB

Check if a color will reproduce well in CMYK print

Inputs: color (required).

validate-wcag-contrastC

Check if a color combination meets WCAG accessibility requirements

Inputs: background (required), foreground (required), level, textSize, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 27 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes: parsing, conversion, contrast, harmony, accessibility, gamut, and theme generation are distinguishable. The main ambiguity is in the generate-* family (generate-palette, generate-harmony, generate-scale, generate-theme, generate-accessible-palette), where an agent may need to compare descriptions carefully to choose the right palette-oriented tool. get-color-info also overlaps somewhat with several individual calculation tools because it returns comprehensive analysis.

    Naming Consistency4/5

    The tool set uses a consistent kebab-case verb-noun convention throughout: get-color-info, calculate-contrast, generate-palette, validate-wcag-contrast, and so on. Minor deviations such as convert-batch (verb-only) and parse-color-string (nonstandard noun phrase) are readable but slightly less predictable. Overall the pattern is strong and easy to infer.

    Tool Count3/5

    At 27 tools, the server is heavy and exceeds the comfortable 3-15 range, with several palette-generation tools that could likely be consolidated or parameterized. The domain is genuinely broad (conversion, accessibility, harmony, themes, tokens, print), so many tools earn their place, but the surface still feels crowded. It is borderline appropriate rather than clearly well-scoped.

    Completeness5/5

    Coverage across color theory is extensive: parsing, conversion across many color spaces, contrast (WCAG and APCA), Delta-E, luminance, temperature, mixing, adjustment, harmony, palettes, scales, themes, design tokens, color blindness, gamut, print safety, naming, and cultural meaning. The accessibility workflows include generation, validation, and reporting, so there are no obvious dead ends. Only niche operations like image-based color extraction appear absent, which does not materially limit the stated domain.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      Enables comprehensive color manipulation, conversion between 22+ formats (HEX, RGB, HSL, CMYK, LAB, etc.), palette generation, gradient creation, and accessibility compliance checking. Supports framework-specific outputs for CSS, Swift, Android, Flutter, and Tailwind with high-precision conversions and visualization capabilities.
      25
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides comprehensive color conversion, manipulation, analysis, and WCAG accessibility tools supporting multiple formats (hex, rgb, hsl, oklch, oklab) for design systems and web development.
      32 npm
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A 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.
      2
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides color and design tools including palette generation, WCAG contrast checking, color conversion, gradients, color blindness simulation, and CSS variables, all without API keys.
      MIT