check_contrast
Compute WCAG 2.x contrast ratios and AA/AAA pass flags for a foreground/background hex pair, using local math with no network calls.
Instructions
Compute WCAG 2.x contrast ratio and AA/AAA pass flags for a foreground/background hex pair. Pure local math — no network.
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 color as #RGB or #RRGGBB (e.g. #ffffff) | |
| foreground | Yes | Foreground color as #RGB or #RRGGBB (e.g. #000000) |