check_contrast
Check contrast ratio between two colors to evaluate WCAG 2.1 accessibility compliance. Supports hex, RGB, HSL, and named colors.
Instructions
Check the contrast ratio between two colors and evaluate WCAG 2.1 compliance. Accepts hex (#fff, #ffffff), rgb(r,g,b), hsl(h,s%,l%), and CSS 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 |
|---|---|---|---|
| background | Yes | Background color (e.g. '#fff', 'rgb(255,255,255)', 'white') | |
| foreground | Yes | Foreground color (e.g. '#333', 'rgb(0,0,0)', 'navy') |