Website Color Contrast Testing: What QA Should Check

A website can be technically functional and still be difficult for users to read or operate.

One of the most common accessibility problems is insufficient color contrast.

Examples include:

  • light gray text on white;
  • button labels that become difficult to read on hover;
  • placeholder text that almost disappears;
  • pale error messages;
  • focus indicators that blend into the page;
  • icons that cannot be distinguished from their background.

These problems can affect users with low vision, color vision deficiencies, age-related vision changes, temporary visual limitations, poor displays, or bright environmental lighting.

Color contrast testing helps QA verify that important website content and controls remain clear and distinguishable.

The key principle is:

Do not rely only on visual judgment. Measure the actual contrast.

For a broader accessibility framework, see Website Accessibility Testing Checklist.

What Is Color Contrast?

Color contrast describes the visual difference between foreground and background colors.

The most familiar example is:

Text Color vs Background Color

Contrast is expressed as a ratio from:

1:1

to:

21:1

A ratio of 1:1 means there is effectively no luminance contrast between the two colors.

Black against white produces the maximum ratio of 21:1.

The higher the ratio, the easier the elements are generally to distinguish.

Why Visual Judgment Is Not Enough

A tester may look at text and think:

I can read this easily.

That does not prove the combination meets the required accessibility threshold.

Perception varies between users.

It is also affected by:

  • screen brightness;
  • display quality;
  • viewing angle;
  • environmental lighting;
  • font size and weight.

QA should therefore combine:

visual inspection

with:

objective contrast measurement

WCAG Contrast Ratios QA Should Know

For most website QA projects targeting WCAG Level AA, three values are especially important.

Normal Text: 4.5:1

Normal text generally requires a contrast ratio of at least:

4.5:1

between the text and its background.

This commonly applies to:

  • paragraphs;
  • navigation labels;
  • form labels;
  • button text;
  • table content;
  • helper text.

Large Text: 3:1

Large text generally requires at least:

3:1

contrast.

Large text is typically approximately:

18 pt or larger

or:

14 pt or larger when bold

Do not assume text qualifies simply because it looks like a heading.

If the distinction matters, verify the actual size and weight.

Relevant Non-Text UI: 3:1

Important user-interface components and graphical information may require at least:

3:1

against adjacent colors where the visual difference is necessary to identify the component or its state.

Examples may include:

  • form control boundaries;
  • meaningful icons;
  • focus indicators;
  • selected states.

For a wider explanation of the standard, see WCAG 2.2 Explained for Website QA Teams.

Enhanced Contrast

Some projects may target stricter WCAG Level AAA requirements.

Common AAA text targets include:

7:1 for normal text

and:

4.5:1 for large text

QA should follow the accessibility level agreed for the project rather than assuming every project targets the same standard.

Start With Core Text

Begin with the combinations used most frequently across the website.

Check:

  • body text;
  • headings;
  • navigation;
  • secondary text;
  • footer content.

Body text usually represents the largest amount of readable content and should be an early priority.

Secondary and Small Text

Secondary information is a frequent contrast failure.

Examples include:

  • timestamps;
  • metadata;
  • captions;
  • helper text;
  • breadcrumbs;
  • footer links.

Design systems often deliberately make these elements lighter.

But if users need to read the information, it still needs sufficient contrast.

Small text deserves particular attention because weak contrast becomes harder to read as characters get smaller.

Test Forms and Feedback States

Forms combine several different color relationships and are therefore high-value contrast targets.

Labels and Entered Text

Check:

Label vs Background

and:

Entered Text vs Input Background

Labels should remain readable, and the value typed by the user should not become too faint because of custom form styling.

Placeholder Text

Placeholder text is a common problem because designers often intentionally make it subtle.

For example:

Enter your email

may appear in very light gray against a white input.

Measure the actual placeholder color.

Do not assume it is exempt because it disappears after typing.

Also remember that sufficient contrast does not make placeholder-only form design ideal. Important fields should still have persistent, understandable labels where appropriate.

Input Boundaries

Users need to be able to identify interactive controls.

If a text field depends on a border to show where the control begins and ends, verify that the boundary remains distinguishable from the surrounding background.

Focus States

A focused input may change:

  • border color;
  • background;
  • outline;
  • shadow.

Check whether the focused state remains clearly visible.

For broader focus testing, see How to Test Focus States and Focus Order.

Error Messages

Error states often use red.

But:

red does not automatically mean accessible

A pale red message on white may be difficult to read.

Check:

  • error text;
  • error icon;
  • input border;
  • error background where used.

Do Not Communicate Errors by Color Alone

Suppose:

Normal Border = Gray

and:

Error Border = Red

If color is the only difference, some users may not recognize the error.

Add another signal such as:

  • error text;
  • icon;
  • explicit label.

Contrast and color-independent communication are related but separate accessibility concerns.

Success and Warning States

Apply the same approach to:

  • green success messages;
  • yellow warnings;
  • orange notices.

For example, white text on bright yellow often produces weak contrast.

Measure the actual combination rather than assuming status colors are automatically readable.

Test Buttons, Links and Interactive States

Interactive components need testing in more than their default state.

A button can pass normally and fail on hover.

A link can pass normally and become faint after it is visited.

A selected tab can use an entirely different foreground/background combination.

Buttons

Check the button label against the button background.

Then test:

  • hover;
  • focus;
  • active;
  • selected;
  • disabled where relevant.

Example:

Default: White text on dark blue
Hover: White text on pale blue

The default may pass while the hover state fails.

Disabled Controls

Some disabled components may be treated differently under specific WCAG contrast requirements.

Even so, QA should still ask whether users can reasonably recognize:

  • that the control exists;
  • that it is unavailable.

Extremely faint disabled controls may still create poor usability.

Links

Check links in:

  • body copy;
  • navigation;
  • cards;
  • footer;
  • tooltips.

Also consider whether links are distinguishable from surrounding text.

A link can contrast sufficiently with the page background while still being difficult to identify inside a paragraph if it differs from normal text only by a subtle color change.

Underline or another visual cue can help.

Keyboard Focus

Keyboard users need a visible indication of where they are.

Test focused:

  • links;
  • buttons;
  • inputs;
  • tabs;
  • menus;
  • custom controls.

Do not evaluate only whether focus exists technically.

Ask:

Can the user actually see it?

For wider keyboard coverage, see How to Test Keyboard Navigation on a Website.

Test Non-Text UI Components

Contrast testing is not only about words.

Important graphical elements may also communicate information or functionality.

Examples include:

  • search icon;
  • close icon;
  • warning icon;
  • checkbox;
  • radio button;
  • toggle;
  • selected row indicator;
  • pagination arrow;
  • focus ring.

If the graphic is necessary to understand or operate the interface, verify that it remains distinguishable.

Icons

An icon used only as decoration is different from an icon that represents an action.

For example:

decorative star

and:

Delete icon

do not necessarily have the same functional importance.

Prioritize meaningful and interactive icons.

Close Controls

Small close icons deserve special attention.

A low-contrast X on a modal or popup may make the control difficult to find.

Checkboxes, Radio Buttons and Toggles

Custom controls often replace accessible browser defaults with branded styling.

Check:

  • control boundary;
  • selected state;
  • unselected state;
  • focus state;
  • disabled state.

Do not rely entirely on:

green = on

and:

gray = off

where an additional label or indicator can communicate the state more clearly.

Test Status, Badges and Data-Dense UI

Modern SaaS interfaces frequently contain small labels such as:

  • Active;
  • Failed;
  • Premium;
  • New;
  • Pending.

Small badge text is especially sensitive to contrast.

Check:

Badge Text vs Badge Background

Also verify that status is not communicated by color alone.

For example:

● Active

is clearer than an unlabeled green dot.

Tables

Tables can contain several background states:

  • normal row;
  • alternating row;
  • selected row;
  • hovered row;
  • disabled row.

A text color that passes on white may fail after the row receives a colored background.

Check important text and links in each relevant state.

Tooltips, Modals and Toasts

Temporary UI elements are easy to miss during accessibility reviews.

Test:

  • tooltip text;
  • modal title/body;
  • modal buttons;
  • close control;
  • toast message;
  • status icon.

Because these elements may appear only briefly, readability is especially important.

Test Text Over Images, Gradients and Video

Simple solid backgrounds are easy to measure.

Complex backgrounds are harder.

Examples include:

  • hero images;
  • gradients;
  • photographs;
  • video;
  • transparent overlays.

Measure the Weakest Relevant Area

Suppose white text appears over a photograph.

One part may be dark enough.

Another part may be very light.

The user experiences the complete background, so do not measure only the most favorable area.

Consider the weakest area behind the text.

Test Gradients

A gradient may pass on one side and fail on the other.

If text spans multiple colors, verify the full rendered combination.

Test Transparency

CSS such as:

rgba()

can make contrast less obvious.

The declared foreground and background colors alone may not represent the final rendered result.

Measure the actual composited colors.

Test Text Over Video

Video backgrounds can change continuously.

A frame that is dark at one moment may become bright later.

Solutions may include:

  • stronger overlay;
  • text background;
  • shadow;
  • solid content panel.

QA should evaluate realistic playback, not only a static screenshot.

Test Responsive Layouts

Contrast can change when the layout changes.

Responsive design may:

  • move text onto another background;
  • crop hero images differently;
  • change button styles;
  • move labels;
  • replace navigation.

A desktop combination passing does not prove the mobile version passes.

Prioritize key breakpoints and representative mobile states.

For the broader workflow, see Responsive Website Testing Checklist.

Real-device testing may also be useful when mobile browser rendering or environmental conditions matter. See Real Device Testing vs Browser Emulation.

Test Light and Dark Modes Separately

If the product supports multiple themes, treat each theme as a separate contrast state.

A component may pass in:

Light Mode

but fail in:

Dark Mode

Pay particular attention to:

  • secondary text;
  • form borders;
  • muted icons;
  • hover states;
  • badges;
  • focus indicators.

Do not assume an automatic color inversion produces accessible results.

Test Zoom and Reflow Where Relevant

Contrast ratios themselves do not necessarily change because the user zooms.

But layout changes can place text against:

  • another image region;
  • another card background;
  • an overlay.

Therefore zoom and reflow can expose new contrast combinations.

Use Objective Contrast Tools

Manual inspection helps identify where to investigate.

Objective tools determine the actual ratio.

A practical process is:

Inspect Component → Identify Foreground → Identify Background → Measure Ratio → Compare With Required Threshold

Browser accessibility tools and dedicated contrast checkers can help.

Automation can also find many common text contrast issues.

However, automation is not sufficient by itself.

What Automated Tools Can Miss

Automated checks may struggle with:

  • background images;
  • gradients;
  • transparency;
  • video;
  • hover states;
  • dynamic components;
  • mobile-specific layouts.

Use automated scanning to find obvious problems quickly.

Then perform manual review for contexts and states the tool cannot reliably understand.

Report Contrast Defects With Evidence

Avoid vague bug reports such as:

Accessibility issue — text hard to read.

Instead include:

  • component;
  • page;
  • state;
  • foreground color;
  • background color;
  • measured ratio;
  • required threshold.

Example:

Title: Helper text has insufficient color contrast

Expected Result:
Normal text should meet the project’s WCAG Level AA contrast requirement of at least 4.5:1.

Actual Result:
Helper text #A3A3A3 against white #FFFFFF does not provide sufficient contrast.

Environment:
Checkout / desktop and mobile

Add the measured ratio where available.

For clearer defect structure, see Expected Result vs Actual Result.

Retest More Than the Single Fixed Component

Contrast problems are often caused by shared design tokens.

Suppose:

--color-gray-500

is used for:

  • helper text;
  • placeholders;
  • footer text.

Changing that token may fix one problem while affecting several other components.

After a contrast fix:

  1. retest the original defect;
  2. identify shared styles;
  3. test related components;
  4. check interactive states;
  5. check responsive variants.

Include Contrast in Design-System QA

The most efficient accessibility strategy is not repeatedly discovering the same invalid color combinations.

Define approved combinations such as:

Dark Navy Text + White Background

White Text + Dark Blue Background

Dark Navy Text + Light Blue Background

Then reuse them consistently.

QA can verify:

design-system standard

and:

real implementation

This is especially valuable after:

  • rebranding;
  • theme changes;
  • CSS refactoring;
  • component-library updates.

Brand colors do not override accessibility requirements.

If a brand blue is too light for white text, the solution may require:

  • darker shade;
  • different text color;
  • alternate background.

Practical Website Color Contrast Checklist

Text

  • Body text meets the required threshold.
  • Secondary text remains readable.
  • Small text is checked carefully.
  • Headings are tested against their actual background.
  • Footer text remains readable.

Forms

  • Labels are readable.
  • Placeholder text is measured.
  • Entered text remains readable.
  • Important control boundaries are distinguishable.
  • Focus state is visible.
  • Error, success and warning messages are readable.
  • Status is not communicated by color alone.

Interactive Components

  • Buttons pass in default state.
  • Hover state passes.
  • Focus state remains visible.
  • Active/selected state remains readable.
  • Links remain identifiable.
  • Meaningful icons remain distinguishable.

Complex UI

  • Tables and selected rows checked.
  • Badges and statuses checked.
  • Tooltips checked.
  • Modals checked.
  • Toast notifications checked.
  • Toggles, checkboxes and radios checked.

Complex Backgrounds

  • Text over images checked.
  • Text over gradients checked.
  • Transparent backgrounds checked.
  • Text over video checked.

Responsive and Themes

  • Desktop checked.
  • Tablet checked where relevant.
  • Mobile checked.
  • Light mode checked.
  • Dark mode checked where available.

Verification

  • Objective contrast tool used.
  • Correct WCAG threshold applied.
  • Interactive states checked manually.
  • Shared design-system colors considered.
  • Failures documented with measurable evidence.

Common Mistakes

Testing Only Body Text

The main article text often passes.

Failures are frequently found in:

  • placeholders;
  • helper text;
  • badges;
  • secondary buttons;
  • focus states.

Trusting Your Eyes

A combination may look acceptable and still fail the required ratio.

Measure it.

Testing Only the Default State

Buttons and links can change significantly on:

  • hover;
  • focus;
  • active;
  • selected.

Test those states independently.

Ignoring Mobile

Mobile layout can move text onto different backgrounds or crop images differently.

Recheck contrast after responsive changes.

Assuming Large Text Automatically Passes

Large text has a lower threshold.

It does not have no threshold.

Verify whether the text genuinely qualifies and measure it.

Relying Only on Automation

Automated tools help, but complex and dynamic backgrounds still need manual review.

Using Color Alone

Good contrast does not automatically make a status understandable.

Combine color with:

  • text;
  • icon;
  • label;
  • shape;

where appropriate.

Ignoring Placeholder Text

Low-contrast placeholder text is common and should be reviewed.

Ignoring Focus Indicators

A barely visible focus outline is not just a cosmetic issue.

It directly affects keyboard usability.

Assuming Brand Colors Cannot Change

Accessible color combinations may require adjusted shades.

Brand identity and accessibility can coexist.

Reporting Without Measurements

Give designers and developers actionable evidence.

Whenever possible, include:

actual ratio + required ratio

A Practical Color Contrast QA Workflow

Step 1 — Identify Core Color Pairs

Start with:

  • body text;
  • headings;
  • links;
  • buttons;
  • forms.

Step 2 — Measure Text

Determine whether normal or large-text thresholds apply.

Step 3 — Check Forms and Feedback

Test:

  • labels;
  • placeholders;
  • errors;
  • focus;
  • controls.

Step 4 — Check Interactive States

Test:

  • hover;
  • focus;
  • active;
  • selected.

Step 5 — Check Non-Text UI

Review meaningful:

  • icons;
  • boundaries;
  • focus indicators;
  • controls.

Step 6 — Check Complex Backgrounds

Include:

  • images;
  • gradients;
  • transparency;
  • video.

Step 7 — Check Responsive Layouts

Verify important desktop and mobile states.

Step 8 — Check Alternate Themes

Test dark mode or other themes independently.

Step 9 — Document Failures

Record:

  • component;
  • state;
  • colors;
  • measured ratio;
  • expected threshold.

Step 10 — Retest and Regress

Verify the fix and related shared components.

Combine Contrast Testing With Broader Accessibility QA

Color contrast is only one part of accessibility.

A complete QA process should also consider:

  • keyboard navigation;
  • focus order;
  • semantic structure;
  • form accessibility;
  • alternative text;
  • zoom and reflow.

Use the Website Accessibility Testing Checklist as the broader framework and color contrast testing as focused deeper coverage.

Include Important Contrast Defects in Release Decisions

Accessibility issues should not automatically be treated as cosmetic.

High-impact examples may include:

  • unreadable checkout information;
  • invisible form errors;
  • focus indicators that cannot be seen;
  • mobile text disappearing against an image.

Evaluate these defects according to:

impact + affected users + criticality of the workflow

Build Contrast Testing Into Regression

Once accessible color combinations are established, protect them during future changes.

Run representative contrast regression after:

  • design changes;
  • theme updates;
  • CSS refactoring;
  • component-library updates;
  • rebranding.

This helps prevent previously fixed accessibility problems from returning.

Final Thoughts

Website color contrast testing is much more than checking black text on a white background.

QA should verify contrast across:

  • primary and secondary text;
  • forms;
  • buttons;
  • links;
  • focus indicators;
  • meaningful icons;
  • status messages;
  • interactive states;
  • complex backgrounds;
  • responsive layouts.

For WCAG Level AA, the key values QA commonly needs are:

4.5:1 for normal text

3:1 for large text

3:1 for relevant non-text UI components and graphical information

But contrast QA should not be reduced to three numbers.

Also ask:

Can the user clearly identify this control?

Can a keyboard user see focus?

Can an error be understood without relying only on red?

Does the contrast remain sufficient on mobile and in interactive states?

Use automated tools to identify obvious problems quickly.

Then manually inspect the states, backgrounds and components automation may miss.

The objective is not simply to make a contrast checker display:

Pass

The objective is to ensure that important website content and controls remain readable, distinguishable and usable across the real interface.

Similar Posts