Web Design

How do I create accessible color combinations that meet WCAG

Learn how to create accessible color combinations that meet WCAG contrast standards, ensuring your designs are readable for people with color vision deficiency.

By Inventive HQ Team

Quick answer: To meet WCAG, put text and its background at a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (Level AA) — 7:1 and 4.5:1 for the stricter Level AA. Interactive UI components and meaningful graphics need 3:1. Contrast is measured as (L1 + 0.05) / (L2 + 0.05) on the two colors' relative luminance, so the safest combinations pair colors with a large brightness difference, not just different hues. And because contrast only measures luminance, never use color as the only signal for meaning — pair it with text, an icon, or a pattern.

That is the summary an AI Overview will hand you, and it is correct as far as it goes. What it can't show you is why combinations that look fine still fail, where the thresholds sit on a ratio scale, and how to move a failing pair to passing without wrecking your palette. The diagram, tables, and decision guide below do that — and there is a live contrast checker built into our color picker tool so you can test your own hex values as you read.

The contrast ratio scale at a glance

Every WCAG threshold is a point on a single 1:1-to-21:1 scale. Seeing where the cut-offs sit makes it obvious why a "nice" mid-gray on white so often lands just short.

WCAG contrast ratio scale A horizontal scale from 1:1 to 21:1 marking the WCAG thresholds: 3:1 for large text and UI, 4.5:1 for normal AA text, and 7:1 for AAA text, with a fail zone below 3:1 shaded red and pass zones shaded green. Where the WCAG thresholds fall

1:1 3:1 4.5:1 7:1 21:1

FAIL below 3:1 Large text + UI (AA) Normal AA 4.5:1 AAA — best for reading

your pair

Body text lives right of the 4.5:1 line. #767676 on white is exactly 4.5:1 — the lightest gray that passes.

The lightest "passing" gray for body text on white is roughly #767676. Anything lighter fails Level AA.

WCAG contrast requirements, side by side

Content typeLevel AA (typical target)Level AAA (stricter)What counts
Normal text4.5:17:1Anything below 18pt/24px regular or 14pt/18.66px bold
Large text3:14.5:118pt/24px regular or 14pt/18.66px bold and larger
UI components & graphics3:1(n/a)Input borders, focus rings, icons, chart bars that convey meaning
Disabled / decorativeNo requirementNo requirementInactive controls and purely decorative color are exempt
Which should I use?Aim for AA everywhere — it is the bar for ADA/Section 508, EN 301 549, and most procurementUse AAA for long-form reading, low-vision audiences, or sunlight/kiosk usePlaceholder text inside an active field is NOT exempt — it needs 4.5:1

Understanding Web Accessibility and Color

Color accessibility is a critical but often overlooked aspect of web design. Approximately 8% of men and 0.5% of women have some form of color vision deficiency (color blindness), and many more people have low vision or use assistive technologies. Additionally, many people view websites on low-contrast screens, in bright sunlight, or with poor displays that reduce color accuracy.

Creating accessible color combinations ensures that all users can read and interact with your content, regardless of their vision capabilities or the device they use.

The Web Content Accessibility Guidelines (WCAG)

The Web Content Accessibility Guidelines (WCAG) are international standards developed by the World Wide Web Consortium (W3C) that define how to make web content accessible to people with disabilities. WCAG 2.2 became the official W3C Recommendation in October 2023 and is the version to build against today; WCAG 2.1 is still widely referenced in law and procurement, and for color and contrast the two are identical. WCAG 3.0 is a longer-term draft that may eventually replace the simple ratio with a perceptual model (APCA), but it is not yet a standard.

WCAG includes specific guidance on color and contrast. The key requirements for accessible color are:

Text contrast requirements specify minimum contrast ratios between text and background.

Color should not be the only means of conveying information. If you're using color to indicate status, you must also use text, icons, or patterns.

These two requirements ensure that people with color blindness, low vision, and other visual impairments can access content.

Understanding Contrast Ratio

Contrast ratio is a mathematical measurement of the difference between two colors. It's calculated using the relative luminance of each color and is expressed as a ratio like 4.5:1 or 7:1.

Luminance is a measure of how much light a color emits or reflects. It's based on the RGB values of a color and accounts for how human vision perceives brightness in different color channels.

The contrast ratio formula is: (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter color and L2 is the relative luminance of the darker color.

Higher contrast ratios indicate greater difference between colors. A ratio of 7:1 means one color is seven times brighter than the other. A ratio of 1:1 means the colors are identical and have no contrast.

Advertisement

WCAG Contrast Requirements

WCAG defines minimum contrast requirements for different types of content:

For normal text (text smaller than 14pt bold or 18pt normal), WCAG Level AA requires a contrast ratio of at least 4.5:1. WCAG Level AAA (stricter) requires 7:1.

For large text (text 14pt bold or larger, or 18pt or larger normal text), WCAG Level AA requires a contrast ratio of at least 3:1. WCAG Level AAA requires 4.5:1.

For user interface components and graphical elements, WCAG Level AA requires a contrast ratio of at least 3:1 against adjacent colors.

Most web accessibility standards target WCAG Level AA compliance, which is a good balance between accessibility and design flexibility.

Testing Contrast Ratio

To determine whether your colors meet WCAG requirements, you need to measure the contrast ratio. Several tools make this easy:

Contrast ratio calculators are available online. Websites like WebAIM's Contrast Checker allow you to input two colors and immediately see the contrast ratio and WCAG compliance.

Browser color picker tools often include contrast checking. Modern browsers include accessibility tools that show contrast ratios when you inspect elements.

Design tools like Figma include built-in contrast checking. When designing, you can check contrast in real-time.

Accessibility testing tools like axe DevTools automatically test your website and report contrast violations.

Creating Accessible Color Combinations

Here are practical steps for creating accessible color combinations:

Start with sufficient contrast. When selecting text and background colors, prioritize contrast over aesthetics. A beautiful color combination that fails contrast requirements isn't usable.

Test systematically. Don't assume colors will work. Test actual color combinations against actual text sizes to verify compliance.

Use high-contrast colors intentionally. Bright colors often have better contrast. Pale pastels often fail contrast requirements.

Avoid problematic color combinations. Red and green have similar brightness to some people with color vision deficiency. Red and blue also can be challenging. When possible, use colors with different brightness levels.

Check in different contexts. Colors might meet contrast requirements in one situation but fail in others. Test text colors, link colors, and interactive element colors.

Consider multiple users. Test with people who have color blindness if possible. Tools simulating color blindness can help identify potential issues.

Use system contrast settings. Some users apply high-contrast modes in their operating system. Test your website with Windows High Contrast Mode enabled to ensure it remains usable.

Common failures and how to fix them

Most contrast problems come from a handful of recurring patterns. Here is the symptom, the underlying cause, and the fix that keeps the design intact.

SymptomCauseFix
Light-gray body text (e.g. #999 on white ≈ 2.85:1)Chasing a "soft" look; gray reads as low-effort eleganceDarken to at least #767676 on white (4.5:1); use weight or size for softness instead of low contrast
Text over a hero photo or gradient passes on one crop, fails on anotherContrast measured against the wrong background pixelAdd a solid or semi-opaque scrim/overlay behind the text, or a text-shadow, so the worst-case pixel still hits 4.5:1
Placeholder text flagged by axePlaceholders in active fields are not exemptMeet 4.5:1 on the placeholder, or replace it with a persistent visible label
Red/green status dots indistinguishable to some usersColor used as the only signal; similar luminanceAdd an icon or text label (✓ / ✕, "Paid" / "Overdue") alongside the color
Brand blue button label unreadableWhite text on a mid-tone brand color below 4.5:1Darken the button fill, or switch label to a darker shade; verify the pair, don't eyeball it
Focus ring invisible on colored buttonsFocus indicator below 3:1 against adjacent colorsUse a 3:1+ outline color (often a dark or offset ring) per SC 1.4.11

Color and Meaning

An important accessibility principle is that color alone should not convey information. If you use color to indicate status, error conditions, required fields, or other important information, you must also use text, icons, or patterns to convey the same information.

For example, don't indicate that a form field is required by only coloring it red. Instead, use a red asterisk AND the text "required" or a red border AND an error icon. This ensures that people who cannot perceive red (red color blindness) still understand that a field is required.

Similarly, don't indicate success or error using only color. Use color in combination with:

Text messaging that clearly states the status

Icons like checkmarks or X marks

Patterns or textures that create visual distinction

This ensures that all users, regardless of color perception, understand the meaning.

Color Blindness Considerations

Different types of color vision deficiency make different colors difficult to distinguish:

Red-green color blindness (protanopia or deuteranopia) is the most common form. People with red-green color blindness have difficulty distinguishing red and green colors. They may see these colors as variations of brown or yellow.

Blue-yellow color blindness (tritanopia) is less common. People with blue-yellow color blindness have difficulty distinguishing blue and yellow colors.

Monochromacy (total color blindness) is very rare. People with this condition see only in shades of gray.

To ensure accessibility for people with color blindness:

Avoid relying on red-green color combinations to communicate critical information.

Avoid blue-yellow combinations when possible.

Test designs with color blindness simulation tools. These tools show you how your color combinations appear to people with different types of color blindness.

Use high-contrast colors and avoid similar-brightness colors that only differ in hue.

Practical Accessibility-Friendly Palettes

Some color combinations are naturally accessible:

Black text on white background: High contrast, works for everyone. Classic and reliable.

Dark blue text on light gray background: High contrast, good for extended reading.

White text on dark backgrounds: Creates good contrast, useful for dark mode designs.

Dark text with colored backgrounds: If using colors, ensure sufficient brightness difference between text and background.

Colors with different brightness: Pair darker colors with lighter colors. Avoid colors that appear the same brightness but different hues.

Tools for Accessible Color Selection

Several tools help create accessible color combinations:

WebAIM Contrast Checker: Enter two colors and see if they meet WCAG requirements.

Coolors Contrast Checker: Check multiple color combinations and see which meet requirements.

Accessible Colors: Suggests accessible color combinations and explains why they work.

Color Oracle: A color blindness simulator that shows you how colors appear to different types of color blindness.

Deque axe DevTools: Browser extension that automatically tests accessibility, including contrast violations.

Figma's accessibility features: Built-in contrast checking and accessibility audit tools.

Best Practices for Accessible Color

Document your color decisions. When you select colors, document why you selected them and confirm they meet WCAG requirements.

Create color palettes with accessibility in mind. Develop your palette by first identifying colors that meet contrast requirements.

Test early and often. Don't wait until the end of a project to check accessibility. Test color contrast during design.

Test with real users if possible. People with color vision deficiency can provide valuable feedback.

Go beyond minimum standards. While WCAG Level AA is a good baseline, consider aiming for stronger contrast in critical areas.

Remember that accessibility is not about compromise. Accessible color combinations can be beautiful and effective. The goal is ensuring everyone can use your website effectively.

Creating accessible color combinations requires understanding contrast ratios, knowing WCAG requirements, and testing your colors systematically. By following these practices, you ensure that your website is usable by everyone, regardless of their vision capabilities or devices used.

Frequently Asked Questions

What contrast ratio does WCAG require for accessible text?

WCAG 2.1/2.2 Level AA requires a contrast ratio of at least 4.5:1 for normal text and 3:1 for large text (18pt/24px regular, or 14pt/18.66px bold). Level AAA raises those to 7:1 and 4.5:1. User-interface components and meaningful graphics need at least 3:1 against adjacent colors. Level AA is the target for most legal and procurement requirements.

How is contrast ratio actually calculated?

Contrast ratio is (L1 + 0.05) / (L2 + 0.05), where L1 is the relative luminance of the lighter color and L2 the darker. Relative luminance is derived from each color's linearized sRGB channels weighted 0.2126 R, 0.7152 G, 0.0722 B — green counts most because human vision is most sensitive to it. Ratios run from 1:1 (identical) to 21:1 (pure black on pure white).

Does WCAG count opacity, gradients, or text over images?

Yes, and they are the most common ways a design silently fails. Semi- transparent text is evaluated against the composited color a user actually sees, not the source color. For text over a photo or gradient, the worst-case background pixel behind the text must still pass — which is why designers add a solid scrim, text shadow, or contrast overlay.

What is the difference between WCAG 2.1 and 2.2 for color?

For color and contrast, nothing changed. WCAG 2.2 became the W3C Recommendation in October 2023 and adds success criteria mainly around focus, dragging, and target size. The contrast thresholds (4.5:1, 3:1, 7:1) are identical to WCAG 2.1, so any tool built for 2.1 is still correct for 2.2.

Why do red and green fail for colorblind users even at high contrast?

Contrast ratio measures luminance difference, not hue difference. Red and green can have nearly identical luminance, so a red/green status indicator may pass a contrast check yet be indistinguishable to someone with deuteranopia or protanopia (about 8% of men). That is why WCAG SC 1.4.1 forbids using color as the only way to convey information — pair it with text, an icon, or a pattern.

Is 3:1 ever enough for body text?

No. 3:1 is the minimum only for large text (18pt/24px or 14pt/18.66px bold) and for UI components and graphics. Regular body copy always needs 4.5:1 at Level AA. A common mistake is applying the 3:1 large-text allowance to 16px paragraphs, which fails.

How do I make gray placeholder or disabled text accessible?

Disabled controls are exempt from WCAG contrast requirements, but placeholder text inside an active field is not — it must meet 4.5:1. Light-gray placeholders (like #999 on white, roughly 2.8:1) are one of the most frequent audit failures. Darken the placeholder or, better, use a persistent visible label instead of relying on placeholder text.

What tools should I use to check color contrast?

For spot checks, use a contrast checker such as our color picker's built-in checker or the WebAIM Contrast Checker. For whole-page audits, use axe DevTools or Lighthouse, which flag every failing element automatically. For colorblindness, simulate with Color Oracle or the Chrome DevTools vision-deficiency emulator.

accessibilityWCAGcontrast ratiocolor blindness