About the Contrast Ratio Calculator
The WCAG contrast ratio compares the relative luminance of two colours on a scale from 1:1 to 21:1. Normal-size text needs 4.5:1 to pass AA and 7:1 for AAA; large text gets a lower bar. This calculator gives the ratio and tells you exactly which levels the pair passes.
Also known as: wcag contrast checker, color contrast calculator, accessibility contrast, text contrast ratio.
How to use this calculator
- Enter foreground (text) colour, background colour.
- The result updates instantly as you type — press Calculate (or Enter) at any time.
- Review the breakdown shown under the main result.
- Use Copy result or Share to save the answer or send a link with your inputs.
Formula
Worked example
Using the values pre-filled in the calculator above:
- Foreground (text) colour: #1F2937
- Background colour: #FFFFFF
the calculator returns:
- Contrast ratio: 14.68 : 1
- Normal text AA (4.5:1): Pass
- Normal text AAA (7:1): Pass
- Large text AA (3:1): Pass