calculate-contrast
Computes the WCAG 2.x contrast ratio between a foreground and background color to verify text accessibility.
Instructions
Calculate WCAG 2.x contrast ratio between two 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": "calculate-contrast"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| background | Yes | Background color | |
| foreground | Yes | Foreground (text) color |