check_color_contrast
Calculate the contrast ratio between two hex colors to determine WCAG accessibility compliance for text and UI components.
Instructions
Check contrast ratio between two specific 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_color_contrast"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| background | Yes | Background color in hex format (e.g., #ffffff) | |
| foreground | Yes | Foreground color in hex format (e.g., #000000) |