check_contrast
Analyze color contrast ratios for WCAG AA or AAA compliance. Accepts hex, rgb, and named color values for foreground and background.
Instructions
Check color contrast ratio for WCAG compliance. Supports hex, rgb, and named colors.
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": {
"foreground": "<foreground>",
"background": "<background>"
},
"name": "check_contrast"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| foreground | Yes | Foreground color (text) | |
| background | Yes | Background color | |
| level | No | WCAG level to check | AA |
| large_text | No | Is the text large (18pt+ or 14pt+ bold)? |