FIELDNOTES / GUIDE

How to Check Text Color Contrast for WCAG AAA

In this guide
AI-generated illustration; not taken on location · Illustration of text samples against light and dark backgrounds.
AI-generated illustration; not taken on location · Comparing text and background colors is the starting point for a contrast check.AI-generated illustration

To check text color contrast for WCAG AAA, identify the text color and the background immediately behind it, enter both colors in a contrast checker, and compare the resulting ratio with the AAA threshold for the text’s displayed size and weight. If the pair falls short, change one of the colors and check it again.

The numbers are only part of a useful review. Text may appear over a photograph, a gradient, or a transparent layer, and its colors may change when someone interacts with it. Check the combinations readers will encounter, then look at the text in its intended setting as well.

Identify the text and background colors

Start with one specific piece of text: a paragraph, a button label, a link, or a message in a form. Identify its foreground color, then find the color directly behind the characters. The surrounding page color may be different from the color of the panel, button, or image that actually sits beneath the text.

If you can inspect or obtain the color values, note both in a format your chosen checker accepts. Keep the values together with a short description such as “button label on button background.” This makes it easier to return to the right pair after making a change. If you are working from a design, check that the values correspond to the version readers will see.

When the background is not a single color

A photograph or gradient can put different background colors behind different parts of the same line. Choose representative areas behind the text and check each relevant pairing. Pay particular attention to areas where the text appears least distinct from what is behind it. If the image, crop, or placement can change, consider the combinations those changes could create.

Transparency also needs care. A translucent text color or overlay can look different depending on what lies beneath it. Check the resulting appearance against the actual background where possible, rather than treating an overlay in isolation as the whole background. If you cannot determine the effective colors, ask the person supplying the design or content how to obtain them, or choose a solid background for the text and check that pairing.

For example, a caption on a photograph may be easier to evaluate if it sits on a solid panel. Check the caption color against that panel, and make sure the panel covers the area behind all of the caption.

Choose the applicable text-size category

A contrast result is useful only when you compare it with the threshold that applies to the text. For AAA, the category depends on the text’s displayed size and whether its weight meets the relevant bold-text criterion. Check the size and weight of the actual text you are reviewing, rather than assuming that a heading, button, or other label qualifies as large because of its role.

If you have access to the design specifications or displayed text settings, record the size and weight with your color pair. Then consult current accessibility guidance to determine whether that combination qualifies for the large-text threshold. For reference when comparing units, 14-point bold text is approximately 18.7 pixels. That conversion alone does not establish the category for every piece of text, so verify the applicable criterion before using a large-text result.

Where a design uses different sizes or weights in different places, assess each relevant version. A label that appears prominent in one layout might be displayed differently in another. If you cannot confirm the displayed size or weight, ask for those details and use the normal-text threshold as a cautious target until the category is established.

The Section508.gov guide to accessible color usage is a useful starting point for checking current guidance. Keep the category alongside your result so someone reviewing the work can see which threshold you used.

Enter the pair and read the result

Choose a contrast checker that accepts the color values you have identified. Enter the text color as the foreground and the color directly behind it as the background, using the input format the checker requests. Obtain the contrast ratio, then compare it with the current WCAG AAA threshold for the text-size category you verified.

The ratio describes how much the two colors differ in contrast. It ranges from 1:1 for identical colors to 21:1 for black and white. A higher ratio indicates greater contrast between the pair. The ratio itself does not identify which text-size category applies, so keep that decision separate from entering the colors.

Use this sequence to interpret the result:

  1. Confirm that both entered values represent the text and its immediate background.
  2. Find the ratio reported for that pair.
  3. Check the current AAA requirement for normal or large text, as applicable.
  4. Compare the reported ratio with that requirement and record the outcome.

If a checker displays several results, read the AAA result for your verified category rather than selecting whichever result looks favorable. If it reports only a ratio, compare that number with the relevant AAA threshold in current guidance. A result for a different conformance level or text category does not answer the same question.

Treat a result close to the threshold with care. Confirm the entered values and the applicable category, and consider adjusting the pair to provide more room above the requirement. Record the ratio, category, and colors together so the result can be checked again if the design changes.

Improve and recheck a failing combination

When a pair falls below the applicable AAA threshold, decide which color you can reasonably change. You might darken text on a light background, lighten text on a dark background, or adjust the background to make the text stand out more. If neither color can move enough on its own, try changing both while preserving the intended appearance.

Make one deliberate change, enter the new pair, and compare the new ratio with the same threshold. Repeat until the pair meets the requirement. Keeping a brief record of the original and revised values helps you compare options and avoid accidentally returning to a failing combination.

For example, if a light-colored label is difficult to distinguish from a pale background, first try a darker label color. If that conflicts with the intended design, try a darker background with a suitably light label instead. Check the actual resulting pair each time; the name of a color or a visual impression alone is not a contrast result.

Where practical, aim for a margin above the threshold instead of stopping at the closest passing value. Then review the result at the size and weight readers will encounter. Anti-aliasing can make thin or unusual fonts appear fainter than their defined text color, even when the nominal ratio passes. A stronger color difference or a different type treatment may help, but any revised color pair still needs its own check.

If the text sits over changing imagery, consider giving it a consistent background or changing its placement. Whatever solution you choose, check the text against the background that will actually be behind it.

Check the text in context

A passing pair answers a question about those two colors. Finish by looking for other combinations that readers may encounter. Check placeholder text, links, button labels, and messages where they appear, including any different colors shown on hover or keyboard focus. If a state changes the text color, the background, or both, evaluate that state as its own pair.

Also review text wherever its background varies. A label may be placed on more than one panel, or a caption may appear over different images. Make a small list of the combinations you need to check and note the result for each. If you do not know whether a state or placement occurs, ask the person responsible for the content or test the available experience before treating the list as complete.

Look beyond the ratio

Read the text in its intended setting after checking the numbers. Consider whether the size, weight, and surrounding design make it easy to distinguish. A color adjustment that improves one label may need another check if that same color appears on a different background.

Finally, check whether readers can understand the information without relying on color alone. For example, a form message can use clear wording to explain what needs attention, rather than expecting the reader to infer the message solely from its color. Review the wording and the contrast of the message itself.

Before you finish, ask: Have I checked the actual foreground and background in each relevant state? Did I use the AAA threshold for the displayed text category? Can I still understand the message without the color cue? These questions turn a single checker result into a more useful review.

Sources

← Return to the tools