Color notes · Updated November 7, 2026
Check color contrast for readable text
A color pair can look beautiful and still be hard to read. Check the foreground against its background before you put the pair to work.
In this guide
Start with the actual foreground and background
Open the color contrast checker and enter the two opaque HEX colors you intend to use. For a paragraph, the foreground is the text color and the background is the surface immediately behind it. Use the final rendered pair rather than a color name or a palette thumbnail.
If your colors come from a screenshot, sample a flat area of the background and the solid interior of the text. Softened text edges can contain intermediate pixels. When you have access to the source CSS or design file, its specified text color is usually the more useful starting point.
Read the ratio and the text-size result together
The ratio compares the colors' relative luminance. It ranges from 1:1 for identical colors to 21:1 for black and white. A ratio alone needs a text-size and conformance-level context before you can interpret it.
| Text category | WCAG AA | WCAG AAA |
|---|---|---|
| Normal text | At least 4.5:1 | At least 7:1 |
| Large text | At least 3:1 | At least 4.5:1 |
WCAG's large-text definition generally starts at 18-point text or 14-point bold text, approximately 24 CSS pixels or 18.7 CSS pixels respectively. A large visual heading is not automatically in that category: check its actual size and weight.
Compare the unrounded ratio with the threshold. A value just below 4.5:1 does not become a pass because a short decimal display rounds it to 4.5. The checker uses the underlying ratio for its result.
Change lightness before abandoning the color
If a pair fails your target, try making the foreground darker on a light background or lighter on a dark one. Changing hue alone may do very little for readability. The color explorer can help you try nearby shades while keeping the original color as a starting point.
Recheck the new pair. HSL lightness is a useful editing control, but it is not the same measurement as the relative luminance used for contrast. Two colors with equal HSL lightness can have different contrast against the same background.
Account for transparency, images, and states
This checker accepts opaque colors. If text is transparent, first determine its composited color over the actual background. A gradient or photograph can create several different backgrounds beneath the same line of text; evaluate the least favorable area rather than checking only an average.
Check hover, focus, selected, and error states as well as the default state. A disabled control and a decorative image have different considerations from active text. Non-text controls and graphical objects also have their own WCAG criterion, so do not apply a normal-text result to every element on a page.
Use the result as one part of a broader review
A passing pair answers a focused question about text contrast. It does not evaluate keyboard access, focus visibility, readable structure, accessible names, motion, color-only instructions, or the usability of an interaction. Keep testing the complete experience.
For the authoritative definitions and exceptions, read W3C's explanations of WCAG 2.2 contrast minimum, enhanced contrast, and non-text contrast.
Common questions
Does a passing contrast ratio make my website accessible?
No. It checks a particular foreground and background pair against text-contrast thresholds. Accessibility also involves structure, keyboard access, labels, focus, interaction, and other requirements.
Can I check a transparent foreground?
This checker accepts opaque three- or six-digit HEX colors. For transparency, gradients, or images, first determine the actual composited foreground and background colors and check the least favorable area.