@gongrzhe/server-color-system-generator
v1.0.0
Published
Color System Generator MCP App Server with interactive palette editor and WCAG contrast checking
Readme
Color System Generator MCP Server
Interactive color palette editor with WCAG contrast checking, color harmony modes, and CSS/Tailwind export.
Features
- Color Harmony Generation: Create palettes using analogous, complementary, triadic, monochromatic, or split-complementary harmonies
- Shade Generation: Auto-generate 11 shade levels (50-950) from any base color
- WCAG Contrast Checking: Verify contrast ratios against AA/AAA accessibility standards for text
- CSS Variables Export: Generate
:rootCSS variables for all palette colors and shades - Tailwind Configuration: Export Tailwind config snippets ready to copy into your project
- Interactive UI: Built-in editor for real-time palette exploration and refinement
Installation
npm install @gongrzhe/server-color-system-generatorUsage
As a CLI
npx @gongrzhe/server-color-system-generatorClaude Desktop Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"color-system-generator": {
"command": "npx",
"args": ["-y", "@gongrzhe/server-color-system-generator"]
}
}
}Claude Code Configuration
claude mcp add color-system-generator -- npx -y @gongrzhe/server-color-system-generatorTools
generate-palette
Generates a color palette from a base color using color theory harmonies, with shades and WCAG contrast checks.
Input:
baseColor(string, required): Base color in hex format (e.g.,#2563eb)mode(string, optional): Color harmony mode (analogous,complementary,triadic,monochromatic,split-complementary). Defaults toanalogous
Output:
baseColor: Original color in hex, HSL, and RGB formatspalette: Array of harmony colors with:- Color formats (hex, HSL, RGB)
- Contrast ratios against white and black
- WCAG AA/AAA compliance flags
shades: 11 shade levels (50-950) in hexcssVariables: CSS:rootvariables ready to pastetailwindConfig: Tailwind configuration snippet
check-contrast
Checks the WCAG contrast ratio between two colors and reports AA/AAA compliance.
Input:
foreground(string, required): Foreground color in hex formatbackground(string, required): Background color in hex format
Output:
ratio: Calculated contrast ratio (e.g.,4.5:1)wcagAA: Whether it meets WCAG AA standard for normal textwcagAAA: Whether it meets WCAG AAA standard for normal textwcagAALargeText: Whether it meets WCAG AA standard for large text (18pt+)
Example Prompt
Generate a color system palette from the base color #3B82F6 using triadic harmonyThis will:
- Create a 3-color triadic harmony (blue, orange, yellow)
- Generate 11 shades for each color
- Check contrast ratios against white and black backgrounds
- Return CSS variables and Tailwind configuration
License
MIT
