Skip to content

Blog

Contrast in business apps: what an audit of our demo found, and how we fixed it

By Bohuslav PoláčekPublished

The text tokens that fell under their APCA floor, as measured on 30 November and 1 December 2026, and the OKLCH lightness they have since decision 0015.

What passed and still read faint

On 30 November 2026 I went through 131 screens of our demo by hand, in light and dark. The checks of the day, WCAG's contrast ratio and axe, passed. Dark mode still read faint: secondary text at 12 and 13px sat at Lc 59 to 60 for fg-muted and Lc 42 for fg-subtle. On Brightpath's plan screen, 538 of 633 texts were under the threshold this post ends with. In light mode the faint grey at 12px gave Lc 72.7 to 74, the coloured labels Lc 70 to 71.

The reason is in the formula. WCAG 2's ratio treats light text on dark the same as dark text on light, and does not weigh size. APCA, a newer contrast method, does both: it gives a lightness contrast, Lc, that depends on polarity, and its thresholds depend on the text's size and weight. That is exactly where our dark mode slipped through.

The thresholds we use

Decision 0014 made APCA the rule, with WCAG 2.2 AA kept as the floor underneath:

Non-text (focus rings, control edges, status dots) stays at WCAG's 3:1, because APCA has no settled floor for marks. Disabled text and text on an image are not measured.

The consequence for a business app: its product text is 12 and 13px, so almost every label, cell and date must reach Lc 75. A grey that holds Lc 60 is for 14px text and up, and for icons.

What the audit found on the first run

A finding in a manual review is gone the next time someone adds a screen, so the review became an audit that runs on every screen. npm run audit opens every screen of the nine demo apps at 1440 and 390px, in light and dark, measures every visible text against the background it really sits on (translucent layers composited, the element's opacity applied) and counts what falls under its threshold.

Its first run, on 1 December 2026, covered 197 screens in four passes and found 40,560 texts under their APCA threshold. The token guard, which checks every text colour on every background it is meant for, found 152 token pairs under their floor.

Today's findings were not fixed in one go. They went into scripts/review-exceptions.mjs as counts per screen that may only shrink: more findings than the count fails the audit, fewer lowers the count. That let other work go on while the contrast was fixed, and kept any new screen from adding to it.

How we fixed it

Not screen by screen. Almost every finding came from a handful of tokens, so decision 0015 fixed the tokens and one rule:

  1. Raise the greys in dark mode, a lot. fg-muted went from OKLCH lightness 0.76 to 0.86 and fg-subtle from 0.655 to 0.78. Dark mode now ranks text by size and weight, not by a dimmer grey: the two greys sit close to the main text colour on purpose.
  2. Keep small text off the faintest grey. 12 and 13px text is fg or fg-muted; fg-subtle is for icons, bullets and text from 14px. 419 places in the kit, the demo, the starter and the playground moved.
  3. Set coloured labels per hue. In dark mode each hue-*-fg got the lowest lightness that holds Lc 75 on its chip and on the page, which differs by hue: 0.855 for aqua, green and cyan up to 0.89 for orange, magenta and red.
  4. Put words on solid fills. A mid-tone status fill cannot hold small text in either theme, so a badge with a word uses a -solid fill, and the mid tone stays for dots and icons.
  5. Let the generator hold the line. The palette generator now keeps fg-muted at Lc 75 and fg-subtle at Lc 60 on every text surface, so a client's brand palette cannot drop below them.

Two things the audit now skips on purpose: text inside a picture of the thing an app works on (a print proof, a drawing sheet), marked data-artwork, which WCAG 1.4.3 exempts as part of an image; and nothing else.

By 2 December 2026 the audit finds no contrast problem on any screen in any pass, with no exceptions left for the rule, and the token guard's list of exceptions is empty.

Do the same on your app

  • Measure in APCA, keep WCAG as the floor. Paste a pair into the APCA contrast checker, or run UI check on a screen you have open: it runs the same rule as our audit and shows every text under its threshold.
  • Check dark mode on its own. A dark theme that inverts the light one's greys usually fails at small sizes, which WCAG's ratio does not show.
  • Fix tokens, not screens. Group the findings by colour token. If one token causes most of them, change the token.
  • Give small text two colours at most. The main text colour and one secondary grey that holds Lc 75; keep the faintest grey for 14px and up.
  • Hold the line. Count today's findings and let the count only shrink, so a new screen cannot add more.

A prompt for the coding tool that maintains your tokens:

text
For every text colour token in this project, list the backgrounds it is used
on and compute APCA Lc for each pair in light and dark. Text under 14px needs
Lc 75, from 14px Lc 60, from 24px or 16px at weight 550 Lc 45, and never
below WCAG 4.5:1. Report every pair under its floor with the sizes it is
used at. Propose a new lightness for the token itself (OKLCH L, same chroma
and hue) rather than changes in components.

The APCA glossary entry explains the method, and semantic colour tokens why the fix lives in the tokens.

Every text token today, computed from the kit

The kit's text tokens on their backgrounds, measured in APCA when this site was built.Computed when the site was built from the kit's colour tokens (Meadowstack kit, packages/kit/src/tokens), with APCA-W3 0.0.98G-4g. Light text on a dark page reads as a negative Lc; its size is what counts.

Sources

Questions

Why APCA instead of the WCAG contrast ratio?

WCAG 2's ratio ignores polarity and text size, so light grey text on a dark page can pass and still read faint. APCA weighs both. We keep WCAG's 4.5:1 as a floor under it.

Is APCA part of WCAG?

Not of WCAG 2.2, which uses the contrast ratio. APCA is a separate method; we use it on top of WCAG's 4.5:1, not instead of it.

What Lc does small text need?

Lc 75 under 14px, Lc 60 from 14px, and Lc 45 from 24px or from 16px at weight 550, which is the rule this site and the framework's audit use.

Does the framework I buy include this audit?

The contrast rule and the tokens are in the repository since 1 December 2026 and come with the next release; 2.1 as sold has the earlier audit with axe. UI check runs the same rule on any screen today.

Two ways

Build it yourself, or have it built

  • Build it yourself

    Build your app on the framework

    Get the codebase these apps stand on and build yours with Claude Code, Cursor or Codex.

    One payment, lifetime updates

    Get the framework
  • Have it built

    Have us build your app

    Tell us how your team works. We plan the app with you and build it on the same framework at a fixed price.

    After launch, Care keeps it improving, from €99 a month.

    from €1,990

    Describe your app