Design for dark mode from day one

By Imran Sheikh · 2026-11-12 · Design · 4 min read

Key points

  • Name colors by role so a theme is a swap, not a rewrite.
  • Test contrast in both themes while you design, not after.
  • Use lighter surfaces for elevation instead of heavy shadows.

Dark mode is easy to add if you planned for it and painful if you did not. The painful version goes like this. The app ships in light. A user asks for dark. Someone inverts the colors and finds that half the screens break, the images look wrong and the brand has turned muddy.

The easy version costs a few decisions at the start. Here are the ones that matter, from our experience designing apps and sites where both themes are first-class.

Name colors by what they do

The root cause of most dark mode pain is a palette named by appearance. A token called gray-100 means one thing in light and nothing useful in dark. A token called surface or text-secondary means the same job in both themes and can take a different value in each.

Start with a short set of roles. Canvas for the page background. Surface for cards and sheets. Line for dividers. Ink for primary text and a muted ink for secondary text. Brand for the one accent. Eight to ten tokens cover most products. Components reference roles only, never raw values.

Once components speak in roles, a theme is a table of values. Adding a third theme later, such as a high-contrast one, becomes a small task instead of a project.

Document the mapping in one place. A simple table with the role, the light value and the dark value is enough. Designers read it to choose colors. Developers read it to check their work. When a bug report says the text looks faint, you open the table and find the cause in a minute.

Do not invert, redraw

A mechanical inversion turns pure white into pure black and gives you harsh glare and smeared text. Dark surfaces work better when they are a very dark gray with a hint of your brand hue. Text works better as a soft off-white than as full white.

Saturated colors also behave differently on dark. A vivid blue that looks calm on white can vibrate on near-black. Lower the saturation or raise the lightness a little for the dark theme and compare the two side by side at real size.

Large areas deserve extra care. A big block of brand color can look loud in dark mode, where the rest of the screen is quiet. Reserve full brand color for small, important elements and use a calmer tint for large fills.

  • Use a dark gray for the canvas instead of pure black, unless you want an OLED look on purpose.
  • Set body text slightly below full white to reduce glare.
  • Re-tune your accent for each theme and check it on both backgrounds.
  • Keep status colors recognizable: green, amber and red still need to read at a glance.

Check contrast in both themes while you design

Contrast is where late dark mode fails quietly. Secondary text that passes in light can slip below the readable minimum in dark. The WCAG contrast guidance applies to both themes equally, and so does your user’s eyesight at midnight.

Make the check part of the token work, not a final audit. For each text role, test it against every surface it can sit on, in each theme. Write the passing pairs down. When a designer later picks a color, the allowed pairs are already there.

Do not forget focus rings, disabled states and placeholder text. They are the first things to fall below the line.

Replace shadows with elevation

Shadows barely register on a dark background. In light mode a card lifts off the page with a soft shadow. In dark mode the same shadow disappears, and the card melts into the canvas.

The usual fix is to let higher surfaces get slightly lighter. A sheet sits above a card, which sits above the canvas, and each step gets a little more light. Define two or three elevation steps as tokens, and use a thin border where a surface still needs an edge.

In dark mode, height is shown by light. Shadows are a bonus.

Treat images, icons and illustration as part of the theme

Components get the attention. Assets cause the surprises. A logo with a white box behind it, a screenshot with a bright light-mode UI, a chart whose gridlines vanish. Each needs a decision.

Prefer icons and illustration that take their color from the current text color so they follow the theme for free. For logos, keep a light and a dark variant. For photographs and screenshots, check that they do not glow like a lamp on a dark page. A small dimming filter or a framed container often solves it.

On the web, honor the user’s system setting first with the prefers-color-scheme media query, and offer a manual toggle that overrides it. On iOS, use semantic system colors and asset catalog variants so the app follows the system without extra code. Apple’s Human Interface Guidelines cover this well.

Test with real screens

A design file in a bright room tells you little about how dark mode feels. Put the build on a phone, turn the brightness down and use it in a dim room. You will see the glare, the muddy brand color and the text that is too faint. Then fix those in the tokens, not in individual screens.

Designing in the codebase makes this natural. The token table is the source of truth, a theme switch is one line, and you can flip between themes on every screen in seconds. That loop is the real reason dark mode from day one costs so little.

Sources

  1. Apple Human Interface Guidelines: Dark Mode
  2. W3C: Web Content Accessibility Guidelines (WCAG) 2.2

Journal · Book a call · Home