Dark mode done properly
Surfaces, contrast and tokens that make dark themes feel premium.

Zander Whitehurst
9 min read
Dark mode is now expected in most products. Users switch to it at night, in dim environments or simply because they prefer it. Yet many dark themes still feel like an afterthought: flat grey on black, poor contrast and colours that look harsh or muddy.
Confession: I design almost everything in dark mode first now. Partly because I work late, partly because it is far less forgiving. Light mode hides a lot of sins. Dark mode shines a torch on every lazy colour choice and every surface that was never really thought through.
Doing dark mode well is not about inverting colours. It is about rethinking surfaces, contrast and colour for a different environment. Here is how to approach it properly.
Dark mode is not inverted light mode
The most common mistake is treating dark mode as a simple inversion. Swap white for black, black for white and call it done.
The problem is that light and dark environments behave differently. In light mode, shadows create depth. In dark mode, shadows barely show. In light mode, saturated colours sit comfortably on white. In dark mode, the same colours can vibrate and strain the eyes.
A good dark theme is designed, not derived.
Avoid pure black
Pure black backgrounds look striking at first, but they create problems. High contrast between pure black and bright text can cause eye strain, especially for long reading. Pure black also leaves no room to show depth, because nothing can be darker than the background.
Instead, use a very dark grey as your base. This gives you room to create layers and makes text easier to read. Many of the most polished dark themes use a base that is close to black but slightly warm or cool.
Build depth with lighter surfaces
In light mode, raised elements like cards and menus usually sit on the same white background and use shadows to show elevation. In dark mode, shadows are hard to see, so depth comes from lightness instead.
The rule of thumb is simple: the higher an element sits, the lighter its surface. The page background is darkest. Cards are slightly lighter. Menus and popovers are lighter still.
Keep the steps between these levels subtle. Small differences in lightness are enough to create clear layers without making the interface feel patchy.
Use borders carefully
Subtle borders help separate surfaces in dark mode, especially where lightness differences are small. A thin border with a low opacity white works well because it adapts to whatever surface sits behind it.
Avoid strong, bright borders. They draw too much attention and make interfaces feel busy. The aim is quiet separation, not outlines.
Get text contrast right
Text needs enough contrast to be readable without being harsh. Instead of pure white for body text, use a slightly softened off white. Reserve the brightest values for headings and key information.
Secondary text should still meet accessibility contrast requirements. It is easy to make muted text so dim in dark mode that it becomes hard to read, so always check contrast rather than relying on how it looks on your screen.
Adjust your colours
Brand and accent colours often need adjusting for dark mode. Highly saturated colours can feel overwhelming on dark backgrounds. Slightly lighter, less saturated versions usually work better.
Status colours such as success, warning and error need the same care. A bright red error message that works on white can feel alarming on black. A softer red with a dark tinted background often communicates the same meaning more comfortably.
Think about images and illustrations
Images designed for light backgrounds can look odd in dark mode. Bright white areas in screenshots or illustrations can feel glaring.
Where possible, provide dark versions of key illustrations and product imagery. For other images, a subtle reduction in brightness or a thin border can help them sit comfortably on dark surfaces.
Tokens make it manageable
Dark mode becomes far easier with semantic tokens. Instead of hard coding colours, components use tokens like surface, surface-raised, text-primary and border-subtle. Each token has a light value and a dark value.
When components are built this way, dark mode mostly takes care of itself. When they are not, every component needs individual attention, and inconsistencies creep in quickly.
This is especially important when working with AI agents. If your tokens are clear and semantic, agents will produce interfaces that work in both themes automatically. If they are not, agents will hard code colours and dark mode will break in unpredictable ways. The AI Dark Mode Skills give your agent these rules so it builds both themes properly.
Test in real conditions
Review dark mode in the conditions people actually use it: in a dim room, at night, on a phone at low brightness. Things that look fine on a bright monitor during the day can feel very different in the dark.
Check every state, not just the main screens. Empty states, error messages, modals and loading screens are often where dark mode problems hide.
I once shipped a dark theme where every error message looked like an emergency siren. Bright red on near black. Users told us they felt anxious opening the app. Nothing was actually broken. It was just the colour. That was the day I learned that colour in dark mode is not decoration, it is emotion.
The payoff
A well designed dark theme makes a product feel premium and considered. Users who prefer dark mode notice the care immediately, and it builds trust that the rest of the product has been designed with the same attention.
It takes more thought than an inversion, but with the right tokens and principles in place, it becomes a natural part of how you design rather than an extra project at the end.
Memorisely