check_contrast
Score any foreground/background color pair for readability. Get WCAG 2.2 ratio with AA/AAA verdicts plus APCA Lc value, revealing dark-theme pairs that WCAG 2.x passes despite poor contrast.
Instructions
Score a foreground/background pair for readability. Reports the WCAG 2.2 ratio with AA/AAA verdicts and the APCA Lc value, which is the better guide for dark themes where WCAG 2.x passes pairs that are hard to read.
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 |
|---|---|---|---|
| background | Yes | Background colour in the same formats. | |
| foreground | Yes | Text colour as #rgb, #rrggbb, or rgb(r, g, b). |