A useful WCAG contrast check starts with a specific color pair and ends with a clear decision: what the colors represent and which threshold they need to meet.

When checking color contrast with a WCAG contrast checker, work from a real color pair, such as body copy on a card or a label inside a button. The free Color Contrast Checker compares one foreground color with one background color and instantly returns the contrast ratio along with pass-or-fail results for the applicable WCAG thresholds.

Because each check evaluates one color pair, it is a precise component and palette check rather than a complete accessibility audit. It can establish whether a particular pair clears a contrast threshold, but other accessibility requirements still need separate review.

how do i get started when i need to check color contrast when using color contrast wcag contrast checker
WCAG Contrast Checker: Text, Icons, and UI Borders

Gather the Inputs Before Testing

Before opening the checker, identify the colors that users will actually see. A design system may contain several text and surface colors, while one component can use different combinations for default, hover, focus, error, and disabled states. Treat each meaningful combination as its own test.

  • Foreground: Choose the final color of the text, icon, border, or other foreground element. If transparency changes its visible color, resolve the effective displayed color before entering a value.
  • Background: Identify the final color directly behind that element. For a solid component, this is usually the surface or container color.
  • Content role: Note whether the element is normal text, large text, or a UI component, icon, or graphical object. This determines how you interpret the result. The checker displays all relevant thresholds at once, so you do not need to select a mode.
  • Required target: Decide whether the element must meet WCAG Level AA, Level AAA, or the separate non-text contrast requirement. The target should reflect the role of the element rather than the level you hope it will pass.

The checker runs locally in your browser, so you can test brand palettes and design tokens privately without uploading the color values.

Run the First Color Pair Check

Use the same sequence each time so the result is easy to interpret and repeat.

  1. Open the checker and set the foreground. Use the color picker or type a hex value such as #111111. Make sure it represents the color you intend to test rather than a nearby palette color that is not in use.
  2. Set the background. Enter the second color in the same way, for example with #ffffff. The foreground and background fields identify the two sides of the comparison, although the contrast ratio itself is symmetric.
  3. Read the contrast ratio. The result gives the exact ratio for the entered pair. It also shows clear pass-or-fail badges for normal text, large text, and non-text contrast.
  4. Match the result to the element. For example, normal body text needs at least 4.5:1 to meet WCAG AA. UI components, icons, and graphical objects need at least 3:1 under the non-text contrast requirement.
  5. Adjust either color until the pair meets the required level. If the pair fails, revise the foreground or background and read the updated ratio and badges. Keep testing the actual colors that will be used.
  6. Repeat the process for every relevant combination. A passing body-text pair does not automatically validate links, buttons, form fields, focus indicators, placeholder text, or other states. Check and record each pair separately.

After making a final adjustment, confirm the result against the actual text size and weight in the interface. Choosing the wrong content category can make an otherwise correct interpretation misleading.

Select the WCAG Target for the Content

WCAG uses different minimum ratios depending on what the color pair represents. The official contrast thresholds are:

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

WCAG defines large text as at least 18pt, or 24px, for regular-weight text and at least 14pt, approximately 18.66px, when bold. Larger and heavier text can use the lower threshold because its thicker strokes are easier to distinguish.

For body copy, use 4.5:1 as the AA target and 7:1 as the AAA target. Headings may qualify for the large-text threshold, but verify their actual size and weight instead of assuming every heading qualifies. Passing AA establishes the minimum target; aiming for AAA can provide more comfortable reading conditions where the design allows it.

For UI components such as form-field borders and focus indicators, use the separate 3:1 non-text target. The same contrast pair can be evaluated against text and non-text requirements at once, but each badge becomes a pass only when the pair is used for that category of content.

For formal guidance on the minimum contrast requirement, consult the W3C’s WCAG 2.1 explanation of contrast minimum.

Resolve Common First-Check Questions

Does the order of the colors matter? No. The WCAG ratio compares the lighter color’s luminance with the darker color’s luminance, so swapping the foreground and background produces the same numerical result. The roles still matter for deciding whether the pair applies to text, an icon, a border, or another element.

How is the ratio calculated? The checker uses the official WCAG 2.x method. Each sRGB color channel is converted to linear light, and the channels are combined into relative luminance with weights of 0.2126 for red, 0.7152 for green, and 0.0722 for blue. The ratio is then (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color and L2 is the darker one. Ratios range from 1:1 for identical colors to 21:1 for pure black on pure white.

Does a large hue difference guarantee a pass? No. Contrast measures luminance rather than hue. Red text on green can look distinct to some viewers while still failing because the two colors have insufficient brightness difference. Do not rely on color alone to communicate status or meaning; pair it with a text label, icon, underline, or another non-color cue.

What does a passing badge prove? It proves that the tested color pair clears that numerical threshold. It becomes a successful check for normal text, large text, or non-text content only when you apply the pair to the appropriate kind of element. The result does not review the rest of the page or replace a broader WCAG assessment.

Test Backgrounds That Change Across an Element

The checker compares one foreground color with one background color. That works cleanly for solid surfaces, but some designs produce a different effective background behind different parts of the same text.

  • Text over an image: Test the lightest and darkest points where a letter can sit. Because the checker receives two color values, identify representative points separately rather than expecting it to sample the image.
  • Gradients: Test the lightest and darkest colors in the gradient, along with any intermediate point where a line of text crosses a significant change. A single ratio can conceal a poor area.
  • Semi-transparent overlays: Determine the effective visible background after the overlay has been composited. The contrast of the original background value alone may not represent what users see.
  • Changing component states: Check placeholder text, disabled states, thin decorative fonts, error messages, and focus indicators individually. Their foregrounds or backgrounds may differ from the component’s default state.

Use separate checks whenever the effective background changes. This turns a complex visual element into several concrete color pairs that can be measured against the appropriate threshold.

Compare a Failing Pair With a Revised Option

When a pair fails, choose a revision based on the design rather than changing colors at random. Keeping the background and darkening the foreground is one option. Keeping the text and lightening the background is another. A third option adjusts both colors while preserving the intended hierarchy.

Whichever route you choose, compare the revised pair with the same requirement used for the original. If the element is normal body text, continue to use the 4.5:1 AA threshold rather than switching to the lower large-text target. If it is an icon or form-field border, assess the non-text result instead.

Also consider the effect of a shared token. Changing a global background can alter the contrast of every foreground color placed on it, while changing a shared text token can affect links, headings, labels, and messages across several components. Rerun each affected pairing rather than assuming the original results still apply.

A revised pair should be tested in its real context. A color that passes on a plain white surface may behave differently on a tinted card, inside a selected state, or against an image. The relevant result is the one produced by the colors users will encounter.

Record Results for Repeatable Review

A single check answers a single color-pair question. A repeatable review keeps the tested values, requirements, and decisions together so the result can be reproduced after a design change.

  • List the meaningful pairs: Include body text on each surface, links on their backgrounds, button labels, form-field borders, icons, and focus indicators.
  • Run each pair separately: Enter the foreground and background, note the ratio, and compare it with the target appropriate for that element.
  • Record the inputs: Write down both hex values, the element or state, the required level, and the pass-or-fail result.
  • Record the context: Note any image, gradient, overlay, font size, weight, or interaction state that could affect how the result should be interpreted.
  • Track design-token changes: Recheck affected pairs after a shared foreground, background, or state color is updated in the design system.
  • Resolve failures before approval: Adjust the relevant color and rerun the checker instead of relying on visual judgment alone.

This creates a clear trail from each design value to its accessibility decision. It also makes later reviews faster because the next reviewer can reproduce the original check, understand the target, and identify exactly which combinations need retesting.

Related reading: Verify Color Contrast Correctly in a WCAG Checker.

Related reading: How to Plan Color Contrast Checks: WCAG Contrast Checker.