Colour converter + WCAG contrast checker
util_colorConvert a colour between hex, rgb, hsl, hsv and cmyk (input: hex, rgb(), hsl() or a CSS colour name), get relative luminance, dark/light, and whether black or white text reads better on it. With 'against', returns the WCAG 2.x contrast ratio and pass/fail for AA/AAA normal and large text and UI components. Use for accessible UI, theme generation, brand colour checks. Price: $0.001 per call (USDC on Base via x402); the first 10 calls per day are free.
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": "util_color"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| color | Yes | Colour: #1a73e8, rgb(26,115,232), hsl(214,82%,51%) or a CSS name | |
| against | No | Optional second colour (e.g. background) for the contrast ratio |