check_color_contrast
Validate color contrast ratios between foreground and background to ensure compliance with WCAG accessibility standards, supporting various color formats and font attributes.
Instructions
Check if a foreground and background color combination meets WCAG contrast requirements
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 in various formats (e.g., "#FFFFFF", "#FFF", "rgb(255,255,255)", "hsv(0,0%,100%)") | |
| fontSize | No | Font size in pixels | |
| foreground | Yes | Foreground color in various formats (e.g., "#000000", "#000", "rgb(0,0,0)", "hsv(0,0%,0%)") | |
| isBold | No | Whether the text is bold |