Compare text and background color contrast
Contrast Checker calculates the luminance ratio between two opaque sRGB HEX colors. It tests AA normal text at 4.5:1, AA large text at 3:1 and AAA normal text at 7:1. Those are color-pair tests rather than a complete accessibility audit.
Check a pair
- Enter the text color as the first HEX value.
- Enter the solid background as the second.
- Read the ratio and pass/fail results, then inspect the sample text.
- Adjust a color and compare again. No Process button is required.
Example: black and white
#000000 against #ffffff produces 21:1, passing all three displayed tests. Identical colors give 1:1. Swapping foreground and background leaves the ratio unchanged, but reverses the preview.
What counts as large text?
WCAG large text is at least 18 point, or 14 point bold. At 96 CSS pixels per inch, that is about 24 CSS pixels or 18.67 CSS pixels respectively. This page does not inspect your font size or weight, so choose the relevant threshold when interpreting the result.
Why might passing colors still be difficult to read?
Transparency, gradients, background images, thin fonts and interaction states affect the actual design. The ratio assumes solid opaque colors. Its displayed value is rounded to two decimals, while pass/fail uses the unrounded calculation. A displayed 4.50 is not a substitute for the reported threshold result.
Input accepts three- or six-digit HEX only. Inspect the least favorable background behind any text over a gradient. W3C contrast guidance describes the text requirement and its exceptions.





