Skip to content
ColorArchive
Accessibility Guide
Search intent: color contrast accessibility guide designers

Color Contrast and Accessibility: WCAG, APCA, and Building an Accessible Palette

Color contrast accessibility is one of the most commonly misunderstood areas of design compliance. Designers know they need to 'pass WCAG' but often do not understand what the standard measures, what it misses, or how to build a palette that passes consistently rather than checking contrast case by case. Understanding the mechanics of contrast standards enables you to design accessible color systems proactively rather than patching them reactively.

AccessibilityWCAGColor Contrast
Key points
WCAG 2.1 contrast ratio is calculated from the relative luminance of two colors using the formula CR = (L1 + 0.05) / (L2 + 0.05), where L1 is the lighter color's relative luminance. A ratio of 4.5:1 is required for normal text (under 18pt or 14pt bold) to meet Level AA compliance. A ratio of 3:1 applies to large text and UI components like form borders and active indicators. Level AAA requires 7:1 for normal text. These thresholds were established in the early 2000s based on research into legibility for users with low vision; they represent minimum requirements, not design targets. Designing to 4.6:1 gives you no margin for production variation or substrate shifts.
The WCAG 2.1 contrast formula has well-documented limitations. It treats all hues equally (a blue-on-white pair with ratio 4.5:1 is equivalent to a green-on-white pair with the same ratio), but human perception does not treat them equally — the eye is less sensitive to blue than to green or red. The formula also weights luminance differently for light-on-dark versus dark-on-light text, but the weighting does not match measured human reading performance. APCA (Advanced Perceptual Contrast Algorithm), proposed for WCAG 3.0, corrects these limitations by separately modeling background lightness, text lightness, font weight, and font size. APCA produces different results for many combinations that WCAG 2.1 passes or fails ambiguously.
The most reliable approach to accessible color systems is to build the accessibility in at the token level rather than the component level. Define your text color tokens so that each one meets the required contrast ratio against every background token it may appear on. Document the valid foreground-background pairs. Components that consume these token pairs are then automatically accessible — the contrast verification happens once during token design, not repeatedly during component design and review.

How WCAG contrast ratio is calculated and what it measures

The WCAG contrast ratio formula converts each color to relative luminance — a value between 0 (absolute black) and 1 (absolute white) — using a linearization of the sRGB values followed by luminance weighting that matches the human eye's sensitivity (more sensitive to green than red than blue). The contrast ratio between two colors is then (brighter luminance + 0.05) / (dimmer luminance + 0.05). This formula measures luminance contrast, not color difference. Two colors that are perceptually very different (a saturated red and a saturated green) can have low contrast ratios if their luminance values are similar. This is why red-green combinations are accessibility problems — not because the colors are too similar to distinguish for color-sighted users, but because many users with color deficiencies cannot distinguish red from green, and the luminance contrast between them is often insufficient to compensate.

APCA and the transition to WCAG 3.0

APCA (Advanced Perceptual Contrast Algorithm) was developed by Andrew Somers to address the limitations of the WCAG 2.1 formula. Key differences: APCA models polarity (light text on dark background vs. dark text on light background) separately, because reading performance differs between polarities at the same contrast ratio. APCA models the impact of font weight and size, so a heavy-weight large heading can pass at a lower contrast value than a thin-weight small body text. APCA outputs a Lc (Lightness Contrast) value rather than a ratio — Lc 60 is roughly equivalent to WCAG 4.5:1 for body text, but the equivalence varies by font. For design teams working on accessibility-critical products, testing against APCA criteria (in addition to WCAG 2.1 for current compliance) future-proofs the design against the upcoming standard change.

Building an accessible color palette proactively

An accessible-first palette design process: (1) Define your background range: the full set of surface colors in your system (page background, card, elevated card, dark mode variants). (2) For each background, determine the accessible text color range: which foreground values produce ≥4.5:1 contrast against that background. (3) Choose your text token values from within this range. If your primary text color does not pass 4.5:1 against one of your background tokens, either the text color or background must change. (4) Define your interactive element palette (buttons, links, form borders) and verify 3:1 contrast against all backgrounds where they appear. (5) Define your status colors (error, warning, success, info) and verify that status-colored text meets 4.5:1 and that status-colored backgrounds paired with white or near-black text also meet 4.5:1. This process front-loads accessibility into palette design, preventing the retrofitting problem.

Dark mode accessibility considerations

Dark mode introduces accessibility complexity that light-mode-only designs avoid. In dark mode, the typical body text relationship is inverted: light text on dark background. The WCAG formula treats this symmetrically (4.5:1 is the same requirement in either direction), but human reading performance for light-on-dark text is measurably lower than dark-on-light for extended reading. Best practices: (1) Use slightly higher contrast values for body text in dark mode — target 6:1 rather than 4.5:1 for sustained reading contexts. (2) Avoid pure white (#FFFFFF) on pure black (#000000) — the extreme contrast of 21:1 causes halation (the bright text appears to glow and bleed) on OLED and high-contrast LCD displays. A warm off-white on a dark gray (e.g., #F0EEE8 on #1C1C1E) produces both lower halation and often slightly better perceived legibility. (3) Test your dark mode at actual display brightness settings — dark mode is often used in low-ambient-light conditions where screen brightness is turned down, which effectively reduces the rendered contrast ratio.

Practical next step

Move from the guide into a concrete palette lane

Guides explain the use case. Collections prove the taste. Packs handle the export and implementation layer.

Related guides