Colour Check
colour_checkCheck a colour pair against the WCAG contrast thresholds. FREE.
Uses the WCAG 2 relative-luminance formula, so the number matches what an accessibility audit will report. Typical input {"foreground": "#767676", "background": "#ffffff"} returns {"contrast_ratio": 4.54, "AA": true, "AAA": false, "required": {"AA": 4.5, "AAA": 7.0}, "verdict": "Passes AA for normal text, fails AAA."}.
Use when generating or auditing an interface. Not for converting colours between spaces and not for palettes. Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "foreground must be a hex colour like #767676"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| background | Yes | Background colour in the same notation. | |
| foreground | Yes | Text colour as hex, e.g. "#767676" or "767676" or "#777". | |
| large_text | No | True for text at least 18pt, or 14pt bold, which WCAG allows to pass at a lower ratio. Default false. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||