Contrast checker
hopi_contrast_checkerWork out the WCAG contrast ratio between a foreground (text) colour and a background colour, both as hex codes, and report whether it passes AA and AAA for normal and large text. Source: https://hopi.co.uk/contrast-checker/
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": "hopi_contrast_checker"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| background | Yes | Background colour as a six-digit hex code, e.g. #FFFFFF | |
| foreground | Yes | Text colour as a six-digit hex code, e.g. #767676 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ratio | No | ||
| aaLarge | No | ||
| summary | Yes | ||
| verdict | No | ||
| aaNormal | No | ||
| aaaLarge | No | ||
| aaaNormal | No | ||
| background | No | ||
| foreground | No | ||
| source_url | Yes | The tool's page on hopi.co.uk (cite or open to check the figure) | |
| ratioString | No |