Check whether a text colour and background colour meet WCAG contrast requirements. Enter hex codes or pick colours.
Contrast ratio: :1
| Check | Needs | Result |
|---|---|---|
| AA normal text | 4.5:1 | |
| AA large text | 3:1 | |
| AA UI components | 3:1 | |
| AAA normal text | 7:1 | |
| AAA large text | 4.5:1 |
The tool converts each colour to relative luminance using the WCAG formula, then computes (L1 + 0.05) / (L2 + 0.05). The ratio is rounded down to two decimals so a 4.499 never shows as a pass.
WCAG 2.x level AA requires at least 4.5:1 for normal text and 3:1 for large text and for user interface components and graphics. Level AAA requires 7:1 for normal text and 4.5:1 for large text.
Text of at least 18 point (24 CSS pixels), or at least 14 point (about 18.66 CSS pixels) when bold.
Ratio = (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter colour and L2 of the darker, with luminance computed from linearised sRGB values.
No. Everything is calculated in your browser and nothing is stored.
Free tool, provided as is, with no guarantee. Passing a contrast check does not by itself make a site accessible or legally compliant. Please do not enter personal information in feedback.