Check WCAG contrast, simulate color blindness, and convert colors via color-mcp-server (uvx)
How do I check WCAG accessibility contrast between two colors, simulate how a color appears under color blindness (deuteranopia, protanopia, tritanopia), and convert between hex/RGB/HSL/HSV — all via a single credential-free MCP server?
Recipe: WCAG contrast check, color blindness simulation, and color conversion via color-mcp-server (uvx)
Package: color-mcp-server v1.27.2 (PyPI) Transport: stdio via uvx color-mcp-server Auth: none — fully credential-free, uses TheColorAPI (free) for some tools; most run locally Tools: 9 total — tool_check_contrast, tool_simulate_color_blindness, tool_convert_color, tool_get_color_info, tool_get_color_info_local, tool_generate_palette, tool_get_complementary_color, tool_generate_gradient, tool_get_css_variables
1. WCAG Contrast Check
// request
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"tool_check_contrast","arguments":{"foreground":"#1a1a2e","background":"#e0e0e0"}}}
// response
{"foreground":"#1a1a2e","background":"#e0e0e0","contrast_ratio":12.92,"wcag_aa_normal":true,"wcag_aa_large":true,"wcag_aaa_normal":true,"wcag_aaa_large":true,"rating":"AAA"}Returns the contrast ratio and pass/fail for AA/AAA at normal and large text sizes.
2. Color Blindness Simulation
// request
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"tool_simulate_color_blindness","arguments":{"color_hex":"#e74c3c","blindness_type":"deuteranopia"}}}
// response
{"original":"#e74c3c","simulated":"#acb840","blindness_type":"deuteranopia"}Shows how #e74c3c (red) appears as #acb840 (olive/yellow) under deuteranopia (green-blindness). Supports: protanopia, deuteranopia, tritanopia, achromatopsia.
3. Color Format Conversion
// request
{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{"name":"tool_convert_color","arguments":{"value":"#3498db","source":"hex","target":"hsl"}}}
// response
{"input":"#3498db","source":"hex","target":"hsl","result":"hsl(204, 70%, 53%)"}Converts between hex, rgb, hsl, hsv.
Notes
- All responses include
structuredContentwith typed fields — no parsing needed isError: falseon all three calls- Server descriptions are in German (author is German-speaking), but tool behavior is universal
- Palette generation (
tool_generate_palette) supports modes: monochrome, analogic, complement, triad, quad
{ "server": "color-mcp-server", "version": "1.27.2", "transport": "uvx color-mcp-server", "tools_count": 9, "calls": [ { "tool": "tool_check_contrast", "input": { "foreground": "#1a1a2e", "background": "#e0e0e0" }, "output": { "contrast_ratio": 12.92, "wcag_aa_normal": true, "wcag_aaa_normal": true, "rating": "AAA" }, "isError": false }, { "tool": "tool_simulate_color_blindness", "input": { "color_hex": "#e74c3c", "blindness_type": "deuteranopia" }, "output": { "original": "#e74c3c", "simulated": "#acb840", "blindness_type": "deuteranopia" }, "isError": false }, { "tool": "tool_convert_color", "input": { "value": "#3498db", "source": "hex", "target": "hsl" }, "output": { "input": "#3498db", "result": "hsl(204, 70%, 53%)" }, "isError": false } ] }