A correct WCAG contrast check requires the actual rendered foreground and background colors, the correct text-size category, and the matching threshold: 4.5:1 for AA normal text or 3:1 for AA large text.

A checker can only evaluate the color pair entered into it, so an accurate result starts with confirming that the pair represents what users actually see. A separate source of error is applying the wrong requirement, such as using the large-text threshold for body copy or the non-text threshold for a paragraph.

For a precise two-color test, use Color Contrast Checker. It accepts foreground and background colors through a color picker or hex entry, then reports the exact contrast ratio with AA and AAA pass-or-fail badges for normal text, large text, and UI elements. The calculation runs locally in your browser, so brand colors and design tokens can be tested without uploading them.

how do i make sure i check color contrast correctly when using color contrast wcag contrast checker
Verify Color Contrast Correctly in a WCAG Checker

What makes a WCAG contrast check correct?

A result is only as reliable as its inputs and interpretation. You need to confirm three things: the colors are the ones displayed to users, the element belongs to the correct WCAG category, and you are reading the badge associated with that category.

For example, a 3:1 pair can pass for large text but fail for normal text. That does not make the checker result wrong; it means the same color pair serves different text sizes and must be judged against a different threshold. UI components such as icons, form borders, and focus indicators have another requirement, so their 3:1 result should not be interpreted as approval for accompanying body text.

Accuracy also depends on testing the final experience rather than an isolated design mockup. Hover styles, dark themes, transparency, gradients, and images can change the effective background. Check each relevant color combination as a separate pair.

Match the threshold to the text

Choose the requirement that matches the element being tested. WCAG provides lower minimums for qualifying large text, while normal-sized body text must meet the stricter threshold.

WCAG requirement Applies to Minimum contrast ratio
Level AA Normal-sized text 4.5:1
Level AA Large text 3:1
Level AAA Normal-sized text 7:1
Level AAA Large text 4.5:1
Non-text contrast UI components, icons, and graphical objects 3:1

For WCAG purposes, large text is at least 18pt, or 24px, in regular weight, or at least 14pt, about 18.66px, when bold. A ratio of 3:1 is therefore not automatically sufficient for a heading; the size and weight must qualify. It is also not sufficient for ordinary paragraph text, which needs at least 4.5:1 for AA.

The W3C WCAG 2.1 minimum-contrast guidance explains the text requirements. The separate 3:1 non-text rule applies to elements such as form field borders, icons, graphical objects, and focus indicators. Passing AA is a minimum, not a ceiling; targeting AAA where practical can provide more comfortable reading conditions.

Confirm the colors users actually see

Begin with the final production values for the text and its background. For a solid-color component, identify the exact foreground and background colors used by the rendered page rather than estimating them from a design image. This is especially important when a design system contains several similar gray, blue, or brand colors.

Foreground and background labels help you avoid entering an unrelated pair, even though the mathematical ratio is symmetric. Enter the text color as the foreground and the directly behind it as the background. If the text sits inside a button, use the button’s final background rather than the page color outside the button.

Resolve the effective color before testing when transparency or layering changes what appears behind the text. A nominal background value may not be the final composite color. Likewise, text over a gradient or image must be checked against the lightest and darkest background points where a letter can appear, as described in the workflow for checking contrast from an image.

Check the relevant component states separately. A default button, hover button, focused button, selected item, error message, and disabled control can all use different colors. A successful default-state check does not establish that the other states pass.

Run the Color Contrast Checker

  1. Open the Color Contrast Checker and set the foreground, or text, color with the color picker or by typing an exact hex value such as #111111.
  2. Set the background color using the same method, for example with #ffffff. Make sure the background is the surface directly behind the text.
  3. Read the exact contrast ratio and the AA and AAA pass-or-fail badges for normal text, large text, and UI elements.
  4. Classify the element using its rendered size and weight. Treat 18pt regular or 14pt bold as the large-text starting point.
  5. Compare the result with the badge for that category. Do not use the large-text or non-text status to approve normal-sized text.
  6. If the required level fails, adjust either the foreground or background color, enter the revised pair, and check the result again until the selected level is met.
  7. Repeat the process for every relevant state, theme, component, and background variation, recording the exact colors, ratio, category, and result for each check.

Read the ratio and status badges accurately

WCAG contrast ratios range from 1:1 for identical colors to 21:1 for pure black on pure white. The ratio describes the luminance difference between the pair. It does not depend on which color is labeled foreground or background, so reversing the two inputs produces the same mathematical result. If an apparent difference appears after reversing the pair, recheck the entered values.

The implementation converts each sRGB color channel to linear light, calculates relative luminance, and applies the formula (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color’s luminance and L2 is the darker color’s luminance. The WCAG contrast formula explained provides a more detailed look at that process.

Each status badge answers a specific question. The normal-text badge concerns the 4.5:1 AA and 7:1 AAA thresholds. The large-text badge concerns 3:1 AA and 4.5:1 AAA. The UI result concerns the 3:1 non-text threshold. A pass in one category does not automatically produce a pass in another.

Contrast measures brightness rather than hue. Two colors can look distinct to some people while still having too little luminance difference to pass. That is one reason color should not be the only way to communicate meaning; pair it with a label, icon, underline, or another visible cue.

Recheck changing and non-text elements

Text, controls, and graphics may need separate checks even when they appear together. Use the foreground and background that apply to each scenario, then compare the result with the requirement for that scenario.

What you are checking Colors to enter Requirement to read
Body copy Final text color and its effective background 4.5:1 for AA or 7:1 for AAA
Large heading Final heading color and its effective background 3:1 for AA or 4.5:1 for AAA
Button label Label color and button background Apply the threshold for the label’s text size
Icon, form border, or focus indicator Component color and adjacent background 3:1 for non-text contrast
Text over a gradient or image Text color and the lightest or darkest affected background Evaluate each effective pair separately

Run additional checks for placeholders, error messages, disabled controls, focus states, selected states, and theme variations. Placeholder text and thin decorative fonts deserve particular attention because their lighter weight can reduce practical readability even when the chosen colors pass a threshold.

For text over a photograph or illustration, one sampled color may conceal the weakest area. Test the point where the letters are least distinct and the point where the background is most extreme. A pair that passes in one location does not prove that the same text passes everywhere it appears.

Use a final verification checklist

Before accepting a contrast result, work through a short quality check:

  • Confirm that the foreground and background values are the final colors shown in the relevant component state.
  • Verify that the background is directly behind the text rather than the page or container color outside it.
  • Classify the text as normal or large using its rendered size and weight.
  • Read the exact ratio and the badge for that category instead of relying on a general pass indicator.
  • Test every relevant theme, interaction state, gradient region, and image background separately.
  • Evaluate UI components, icons, borders, and focus indicators against the non-text requirement.
  • Document the color values, ratio, applied threshold, element category, and state so the result can be reproduced.

If a result seems inconsistent, begin by checking the exact hex values, the effective background, and the text classification. The checker uses the WCAG 2.x contrast calculation, so the verification task is to make sure the tested pair and selected requirement match the rendered element. Once that alignment is confirmed, the ratio and badge provide a clear basis for deciding whether the color combination needs adjustment.