check_contrast
Evaluate two hex colors against WCAG contrast standards. Returns ratio and pass/fail for AA and AAA levels.
Instructions
Check if two colors meet WCAG contrast ratio requirements.
Args:
foreground: Foreground color as hex (e.g., "#333333" or "333").
background: Background color as hex (e.g., "#ffffff" or "fff").
Returns:
Contrast ratio and pass/fail for WCAG AA and AAA levels.
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 |
|---|---|---|---|
| foreground | Yes | ||
| background | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |