@mukundakatta/color-mcp
v0.1.0
Published
MCP server: convert colors between hex/rgb/hsl and compute WCAG contrast ratios.
Downloads
35
Maintainers
Readme
color-mcp
MCP server: convert colors between hex/rgb/hsl and compute WCAG contrast ratios. No external dependencies.
Tools
convert
{ "color": "#ff8800" }→
{
"hex": "#ff8800",
"rgb": { "r": 255, "g": 136, "b": 0 },
"hsl": { "h": 32, "s": 100, "l": 50 },
"rgb_string": "rgb(255, 136, 0)",
"hsl_string": "hsl(32, 100%, 50%)"
}Accepts #rgb, #rrggbb, rgb(r, g, b), or hsl(h, s%, l%) input.
contrast
{ "foreground": "#000000", "background": "#ffffff" }→
{
"ratio": 21,
"aa_normal": true, "aa_large": true,
"aaa_normal": true, "aaa_large": true
}Thresholds follow WCAG 2.x: AA normal ≥ 4.5, AA large ≥ 3, AAA normal ≥ 7, AAA large ≥ 4.5.
Configure
{ "mcpServers": { "color": { "command": "npx", "args": ["-y", "@mukundakatta/color-mcp"] } } }License
MIT.
