validate_color
Validate any color string and convert between hex, RGB, and HSL formats, with a dark/light indicator based on WCAG luminance.
Instructions
Validate a color and convert it between hex, rgb, and hsl formats.
Accepts hex (#FF5733 or shorthand #F53), rgb(255,87,51), rgba(), hsl(14, 100%, 60%), and hsla(). Always returns all three formats plus a dark/light indicator based on WCAG luminance.
Args: color: Color string in any supported format
Returns: dict with keys: valid, input_format, hex, rgb, rgb_string, hsl, hsl_string, is_dark, cost_usd
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"color": "<color>"
},
"name": "validate_color"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | Yes |