A token has two values, and neither is an inversion of the other. Some swap ends of the ramp, some barely move, and some are identical in both modes, and knowing which is which is the whole of building a dark theme that is not a filter.
Hekla is rebuilding the playout screen for a radio station in Reykjavik. It runs in a studio with the lights down for most of the day, so dark is the primary mode and light is the exception, which is the reverse of the usual assumption and makes every decision below visible.
The ones that swap, and the ones that do not
Surface 98 becomes 18 and ink 22 becomes 92. Those two look like an inversion and they are the only pair that behaves like one.
One theme, two modes
Four lightness shifts across modes, and only two swap ends
Surface and ink invert across the middle, while borders widen their step and raised panels climb lighter in dark mode.
OKLCH lightness value from 0 to 100
light modedark mode
- Surface9818the pair that genuinely looks like an inversion
- Ink2292the other half of the swap across the ramp
- Border863214 points from dark surface against 12 in light to read the same
- Base to raised (dark)1824rises lighter because shadows disappear on a dark ground
Inverting a raised panel makes it darker than base 18, turning a floating card into a hole.
Modular Type Scale & CSS Flex/Grid Motion Lab
Test harmonic typography ratios and live Flexbox/Grid layouts with 1-click CSS export.
Then a raised surface goes to 24, lighter than the base, not darker. In light mode a raised panel is separated by a shadow; in dark mode a shadow is invisible, and the separation has to come from lightness, so anything that rises gets lighter. Inverting the light mode values gives a raised panel that is darker than what it sits on, which reads as a hole.
The border moves from 86 to 32, which is further from its surface than in light mode. A dark ground needs more separation than a light one to show the same line, so a border that was 12 points from its surface in light needs about 14 in dark.
Chroma is the correction nobody makes
Drop the accent's chroma by about a third in dark mode. A saturated colour on a dark ground vibrates: the edge shimmers, small text on it is unreadable, and the effect is worse on the OLED panels that studio screens tend to be.
Chroma correction
What adjusts in dark mode versus what stays fixed
Saturated accents vibrate on dark OLED screens, while learned signal hues and photo overlays must stay constant.
Lighter and less saturated sounds like two edits, yet both serve one goal: matching perceived strength.
So the accent goes from lightness 52 to 68 and chroma 0.16 to 0.11. Lighter and less saturated, which sounds like two changes and is one decision: keep the perceived strength the same against a completely different ground.
Three things do not move. The focus ring and the danger hue keep the same hue in both modes, because both are learned signals and a hue that shifts between modes is a signal that has to be relearned. And anything sitting on a photograph does not change at all, because the photograph did not change.
States have a direction
Hover moves one step towards the ink in light mode and towards the surface in dark. That is the rule that stops a dark theme's hover from reading as a disabled state: in light mode a control gets darker when pointed at, and in dark mode it gets lighter, and both are moving towards the foreground rather than in a fixed direction.
Interactive states
Hover shifts toward the foreground, not in a fixed direction
Flipping lightness without reversing hover direction makes interactive controls look greyed out and disabled in dark mode.
- Light modeStep darker toward inkdarkening pulls the control toward the reader
- Dark modeStep lighter toward foregroundlightening prevents controls from reading as unavailable
Contrast checks cannot catch a hover state that steps the wrong way and feels inactive.
Getting this wrong produces the most common dark mode complaint, which arrives as everything looking greyed out. It is not a contrast failure and it will not show in a ratio check. It is a control moving away from the reader when it should be moving towards them.
What to open
CSS light-dark() holds both values in one declaration, part of the language and in every current browser since 2024, and it replaced two blocks of custom properties and a class on the root element. The reason it matters is not brevity: a token whose two values sit on the same line cannot drift, and drift is what happens to every pair kept in two places.
What to open
Pair both mode values together, then check meaning
Keeping light and dark values on a single declaration stops token pairs from drifting apart over time.
- 01Use CSS light-dark()supported in current browsers since 2024 without separate root blocks
- 02Pair non-web tokens on one linereplaces two files kept in sync by hand
- 03Switch modes and audit meaningconfirm urgent never blurs into unavailable or indistinguishable states
Every token changes value on toggle; the real check is whether any token changed its job.
A token file with both values on one line does the same job wherever the platform is not a browser. It is free, and it replaces two files that somebody keeps in step by hand, which works until the week somebody is away.
Then switch modes and look for what changes meaning, not what changes value. Everything changes value. What matters is whether anything that meant urgent now means unavailable, or whether two states that were distinguishable have become the same.
Where it stalls: the inversion ships
Dark mode arrives as a request with a date on it, and there is a way to satisfy it in an afternoon: take every value, flip its lightness, ship. It looks plausible in a screenshot, it passes a contrast check because the ratios are preserved by construction, and it is done.
Where it stalls
Why an afternoon lightness flip passes review yet fails in use
Mathematical inversion preserves contrast ratios and ships fast, hiding eight subtle flaws until long studio shifts.
- Ships in one afternoonmeets a tight deadline by flipping every lightness value
- Passes automated contrast checksratios stay intact by construction
- Chroma vibrates on dark groundsedges shimmer and small text loses clarity
- Elevation and hover directions invertraised panels sink and active controls look disabled
- Needs a full week to tune properlyexamining every token, elevation step, and state direction
Inversion looks plausible in a static review because no single flaw breaks a ratio check.
A second set of decisions is a week: every token examined, the chroma corrections made, the elevation model rebuilt, the states given a direction. An inversion is one afternoon and a second set of decisions is a week, and the afternoon ships.
What makes it hard to argue against is that the inversion is not obviously broken. It is subtly wrong in about eight places, none of which anybody can point at in a review, and all of which are found later by somebody using the product in the dark for eight hours.
What it looks like when it goes wrong
The station's first dark theme was an inversion. The danger red at lightness 50 became lightness 50 flipped, which landed as a pale pink at low chroma against an 18 lightness ground, and it read as a disabled control rather than as an alert. During a live show a presenter did not register the microphone warning for about eleven seconds. Nothing in the theme had failed a check: the pink passed contrast comfortably, and what it had lost was not legibility but meaning.
When it goes wrong
How a passing contrast ratio hid a live microphone alert
Flipping a lightness 50 danger red onto an 18 ground turned an urgent warning into a muted pink button.
- Danger red flipped at lightness 50landed as pale low-chroma pink on 18 ground
- Contrast ratio check passedpreserved legibility while stripping signal urgency
- Presenter missed live mic warningread as disabled for roughly eleven seconds on air
What failed was not contrast against the surface, but the learned meaning of red.
How many tokens there should be before any of them has two values is how many colours, and what each is for. The raised surface at 24 is one level of a model that needs its own numbers, which is elevation that means something. And the pink that passed its ratio and lost its meaning is exactly the failure described in ratios, and not using colour alone. What else the surface is made of is one level up, in making an interface look considered.