Use this when checking whether a text/background color pair meets WCAG 2.x accessibility contrast.
Use this when checking whether a text/background color pair meets WCAG 2.x accessibility contrast. Computes the relative-luminance contrast ratio (1-21, rounded to 2 decimals) and returns pass/fail booleans for normal and large text at AA and AAA levels (thresholds 4.5 / 7 / 3 / 4.5), plus a suggested passing foreground hex when normal-text AA fails (null when it already passes or none is found). Accepts 3- or 6-digit hex, with or without a leading '#'; echoed colors are normalized to 6-digit hex. Deterministic: same input, same output. Example: {foreground:'777', background:'fff'} -> ratio 4.48, normalAA false, largeAA true, suggestedForeground '#767676'.
Request
- Base URL: https://api.clean.tools
- URL: https://api.clean.tools/v1/color_contrast
- Auth: none declared
Request body
Response
Structured tool result.
Changes
No recorded changes to this operation across all 1 revision of this API.