Color contrast checker (WCAG)
Enter both colors as hex (#1f2937) or rgb(31, 41, 55).
Result
4.54:1Contrast ratio
- AA, normal text (4.5:1)
- ✓
- AA, large text (3:1)
- ✓
- AAA, normal text (7:1)
- ✕
- AAA, large text (4.5:1)
- ✓
- Colors read
- #767676 / #ffffff
Inputs
- Text color
- #767676
- Background color
- #ffffff
How it is calculated
Each color’s relative luminance is computed from its linearized sRGB channels.
Result
Contrast ratio
- AA, normal text (4.5:1)
- ✓
- AA, large text (3:1)
- ✓
- AAA, normal text (7:1)
- ✕
How it is calculated
- Each color’s relative luminance is computed from its linearized sRGB channels.
- Ratio = (lighter L + 0.05) ÷ (darker L + 0.05), from 1:1 to 21:1.
- The ratio is compared with the WCAG 2 thresholds without rounding.
Example
#767676 on white gives 4.54:1: AA for normal text, not AAA.
Good to know
- Large text is at least 24 px, or 18.66 px bold.
- Transparency and gradients are not taken into account.
Frequently asked questions
What is this tool used for?
Enter both colors as hex (#1f2937) or rgb(31, 41, 55).
How is the result calculated?
Each color’s relative luminance is computed from its linearized sRGB channels.
What should I check before using the result?
Large text is at least 24 px, or 18.66 px bold.