Color contrast checker
Enter a text color and a background to see the WCAG 2.x contrast ratio and what it passes.
Large text sample
Normal body text reads like this.
- AA normal text
- AA large text
- AA interface parts
- AAA normal text
- AAA large text
How is the contrast ratio calculated?
The ratio follows the WCAG 2.x formula: the relative luminance of the lighter color plus 0.05, divided by that of the darker color plus 0.05.
What contrast ratio does WCAG AA require?
Normal text needs 4.5:1 for AA and 7:1 for AAA; large text and interface parts need 3:1.
The closest passing color keeps your hue and chroma and moves only lightness in OKLCH until the text reaches 4.5:1, so the fix stays recognisably the same color. This site does not use APCA, whose license does not allow it here.
Ready answers
| Text | Background | Ratio | AA text | AA large / UI | AAA text |
|---|---|---|---|---|---|
#767676 | #FFFFFF | 4.54:1 | Pass | Pass | Fail |
#777777 | #FFFFFF | 4.48:1 | Fail | Pass | Fail |
#595959 | #FFFFFF | 7.00:1 | Pass | Pass | Pass |
#FFFFFF | #3366CC | 5.37:1 | Pass | Pass | Fail |
#000000 | #FFD700 | 14.97:1 | Pass | Pass | Pass |
#FFFFFF | #FF5733 | 3.15:1 | Fail | Pass | Fail |
#FFFFFF | #2E8B57 | 4.25:1 | Fail | Pass | Fail |
#1B1C1E | #F7F7F5 | 15.90:1 | Pass | Pass | Pass |
#FFFFFF | #FF69B4 | 2.65:1 | Fail | Fail | Fail |
#000000 | #808080 | 5.32:1 | Pass | Pass | Fail |
#FFFFFF | #000080 | 16.01:1 | Pass | Pass | Pass |
#FFFFFF | #008080 | 4.77:1 | Pass | Pass | Fail |