Dark mode has moved from a developer preference to a mainstream user expectation, and many products now ship both a light and a dark theme. A common assumption is that dark mode is inherently accessible because it increases contrast. In practice, the opposite is often true: dark themes introduce a distinct set of contrast failures that are different from, and sometimes harder to spot than, those found in light themes.

WCAG thresholds apply equally to dark mode

WCAG 2.2 does not distinguish between light and dark themes. The same contrast ratio requirements apply regardless of whether the background is white or near-black:

What changes in dark mode is the direction of the luminance difference: text is now lighter than the background, whereas in light mode it is darker. The math is the same but the intuition is inverted, which is where many designers go wrong.

The most common dark mode contrast failures

These are the patterns most frequently flagged in accessibility audits of dark interfaces:

The most deceptive dark mode failure: a color that looks clearly readable on screen because the eye adapts to the dark environment but achieves only 3.5:1 — which is above 3:1 (large text) but below 4.5:1 (normal text). Test with actual hex values, not visual judgment.

Recommended lightness ranges for dark theme text

On a typical dark background in the #0D0D0D to #1E1E1E range, the following lightness targets for text colors (in HSL) reliably hit the required thresholds:

Checking dark mode systematically

The most reliable workflow is to maintain explicit dark-mode token pairs in a spreadsheet or design token file and run a contrast check for each pair. This means listing every foreground token with every background it appears on in dark mode — not just the obvious body-text-on-page-background pair, but also secondary text on card backgrounds, icon colors on button backgrounds, and focus ring colors against the page.

The Flowfiles contrast checker lets you enter any two hex values and instantly see the ratio. Keep a tab open as you work through your dark token list and flag failures before they reach production.

Dark mode and APCA

APCA (Advanced Perceptual Contrast Algorithm, proposed for WCAG 3) behaves differently from the WCAG 2.x formula in dark mode. Because human contrast perception is not symmetric — we are more sensitive to luminance differences against dark backgrounds — APCA assigns different Lc values to the same pair depending on which color is the foreground. For dark mode, APCA often requires slightly higher lightness values for text to match the perceptual equivalent of a light-mode design. This is one of the key improvements APCA brings over the current formula.