Check color contrast against WCAG
check_color_contrastComputes the WCAG 2.x contrast ratio between a text color and a background color and reports pass/fail for AA and AAA, for normal text, large text (18pt, or 14pt bold) and UI components. Suggests the nearest passing text color when AA fails. Accepts #hex, rgb() or basic color names.
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_color_contrast"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| background | Yes | Background color, e.g. '#ffffff'. | |
| foreground | Yes | Text color, e.g. '#767676'. |