WCAG Color Contrast: Ratios and Accessibility Requirements

WCAG contrast ratios compare foreground and background luminance. Apply the relevant criterion to the actual text or component; passing a color pair alone does not establish full accessibility or legal compliance.
Key Takeaway
Low contrast can make content difficult to read and should be checked during an accessibility review.
These live figures describe all scanned sites. They do not establish prevalence for an AI-built subgroup, compare development methods, or attribute findings to AI generation.
SimplyScan's live statistics cover 127 distinct live sites, counting each site's latest completed scan.
Review accessibility findings and check actual foreground and background pairs with the color contrast checker.
What Is a Contrast Ratio and How Is It Calculated?
WCAG calculates relative luminance from linearized RGB channels, then divides the lighter luminance plus 0.05 by the darker luminance plus 0.05. Equal luminance gives 1:1; black against white gives 21:1. Different hues can have equal luminance.
A calculated ratio is reproducible, but applying the criterion also requires the actual background, text size, weight, and display state. Gradients and images require checking the area behind the text.
For ordinary text, the WCAG contrast minimum is:
- 4.5:1 for normal text.
- 3:1 for large text: at least 18 points, or 14 points when bold.
Exceptions include incidental text and logotypes. Do not round a failing ratio up to the threshold.
How Should You Check Text Contrast?
Check text contrast in the actual foreground, background, and interaction states used by your application.
Automated tools can flag some contrast failures. Inspect text and backgrounds in their actual display states; remediation time depends on the affected components and designs.
Is WCAG Color Contrast a Legal Requirement?
Accessibility obligations depend on the jurisdiction, organization, and service. Contrast is part of accessibility review; it is not a substitute for the separate controls in an application security checklist.
The European Accessibility Act covers specified products and services, with exceptions and national implementation requirements. Determine whether your service falls within its scope.
In the US, Department of Justice guidance explains web accessibility under the ADA. Requirements differ by the entity and applicable rules; do not treat a contrast check as a legal compliance determination.
How Should You Review AI-Generated UI Colors?
Check body text, placeholder text, secondary labels, and interactive states against their actual backgrounds, regardless of how the interface was created.
A palette that looks acceptable to its designer may still fail the relevant contrast criterion. Measure the rendered pairs and test readability.
20% of the 127 live sites SimplyScan has scanned (26 sites) have at least one medium-severity accessibility issue, such as no main landmark or more than one H1 heading.
The accessibility category includes more than contrast and does not measure an AI-only population. Inspect individual checks and verify relevant display states. See is vibe coding safe.
How Do You Fix a Failing Palette Without a Redesign?
Try adjusting foreground or background lightness, then recalculate the actual ratio. Hue changes also affect relative luminance; a fixed hue cannot guarantee a suitable pair for every use.
- Adjust the foreground or background and measure the result; retain brand hues where the resulting contrast works.
- Review text grays, secondary labels, and placeholders against their actual backgrounds.
- Use brand colors in contexts where the relevant criterion is met; a heading qualifies as large text only when its size and weight meet the definition.
- Check both light and dark themes independently.
- Review meaningful graphics and the visual information needed to identify controls and states under WCAG non-text contrast. That criterion uses 3:1 against adjacent colors with stated exceptions, including inactive controls. Do not convey information by color alone.
Work pair by pair in the color contrast checker, update shared design tokens where appropriate, and re-test every affected component and state.
Beyond Contrast: The Vibe Coding Security Checklist
Contrast is part of usability and accessibility. Review application security separately.
32% of the 127 live sites SimplyScan has scanned (41 sites) have at least one high or critical security issue.
After the contrast review, use the vibe coding security checklist and broken access control checklist to plan security tests. For Supabase, inspect grants and RLS policies; for Firebase, review Security Rules and privileged server access.
Check Your Palette Now
Enter actual foreground and background colors in the color contrast checker, choose the applicable criterion, then review buttons, placeholders, and both themes. Record the tested pairs and states.
Track accessibility and security findings separately so each receives the appropriate verification.
Use a free URL scan to gather additional supported site observations after the contrast review.
SimplyScan grades 8 dimensions, including security, speed, and compliance signals. Its advertised target is about 30 seconds; observations depend on the target and available coverage.
FAQ
What contrast ratio does WCAG level AA require?
Normal text needs 4.5:1; large text needs 3:1 under the WCAG contrast minimum. Large text means at least 18 points, or 14 points bold. Apply the criterion’s exceptions and check the actual rendered background.
Does dark mode need its own contrast check?
Yes. Test the actual foreground and background pairs in both themes. Passing in a light theme does not establish that a dark theme passes. Review relevant component states under the applicable text or non-text criterion.
How common are color contrast failures?
The supplied aggregate data does not rank contrast failures. Check text and backgrounds in their actual display states.
Do I have to change my brand colors to pass WCAG?
Try adjusting foreground or background colors and recalculate the ratio. You may retain a brand hue, but that is not guaranteed for every use. The large-text threshold applies only when the size and weight qualify.
Does the European Accessibility Act apply to US companies?
It can apply when a company supplies products or services covered by the Act in the EU. Scope, exceptions, and national implementation matter; check the applicable requirements rather than assuming every website is covered.
How long does it take to fix contrast issues across a site?
The time depends on affected components and states. Shared design tokens can help update components that use them, but overrides and independent styles need separate review. Re-test the rendered result after changes.
Frequently asked questions
Is your app secure? Run a free security scan in 30 seconds · free account required.
Scan your app free →