Dark Mode Design Done Right: A Practical Guide to Color, Contrast, and Depth
Dark mode is more than inverting colors. Good dark interfaces need carefully chosen surfaces, softened text, adjusted brand colors, and new ways to show depth. Here is a practical guide to designing dark UIs that look premium and stay readable.

Dark mode has moved from a novelty to an expectation. Operating systems offer it by default, developers spend their days in dark code editors, and many users switch to dark themes in the evening or permanently. Some products, especially creative tools, media apps, and premium marketplaces, are designed dark-first.
Yet dark mode is often implemented poorly. The most common approach is to take a light interface and invert it: white becomes black, black becomes white, and everything else stays roughly the same. The result tends to look harsh, flat, and tiring to read.
Designing a good dark interface requires rethinking color, contrast, and depth from the ground up. This guide covers the principles that make dark UIs feel polished and comfortable.
Avoid Pure Black Backgrounds
The first instinct in dark mode is to use pure black (#000000) as the background. It seems logical: dark mode means black. In practice, pure black creates problems.
White or near-white text on pure black produces extremely high contrast. For many people, this causes a halation effect, where bright text appears to bleed or glow into the background, making long passages harder to read. It can also make interfaces feel stark and cold.
Pure black also leaves you no room to create depth. If the background is already as dark as possible, you cannot use darker shades to push elements back.
Instead, use a near-black or dark gray as your base surface, something in the range of #0a0a0a to #121212. This keeps the interface feeling dark while softening contrast and leaving room for layering. Some designers add a very subtle tint, such as a hint of blue or the brand hue, to give the dark palette more character.
Build a Layered Surface System
In light interfaces, depth is usually communicated with shadows. A card casts a shadow on the background, and a modal casts a larger shadow over everything else. In dark mode, shadows are much less visible, because there is little light to block.
Dark interfaces typically communicate depth with lightness instead. The further forward an element is, the lighter its surface. A common structure looks like this:
- Base background: the darkest surface, used for the page itself.
- Raised surface: slightly lighter, used for cards, panels, and sidebars.
- Overlay surface: lighter again, used for dropdowns, popovers, and menus.
- Modal surface: the lightest, used for dialogs that sit above everything.
The differences between levels should be small, often just a few percentage points of lightness. Large jumps make the interface look patchy. Define these levels as design tokens so they are applied consistently across every component.
Subtle borders can help separate surfaces, especially when the lightness difference is minimal. A one-pixel border with low-opacity white often works better than a heavy shadow.
Soften Your Text Colors
Just as pure black is too harsh for backgrounds, pure white is often too harsh for text. Large blocks of #ffffff on a dark background can feel glaring.
Use off-white for primary text, and reduce brightness further for secondary and tertiary text. A typical hierarchy might be:
- Primary text: high-emphasis content like headings and body copy, around 87β95% white.
- Secondary text: supporting information like metadata and captions, around 60β70% white.
- Disabled or placeholder text: around 38β50% white.
Using opacity or lighter grays to create text hierarchy works well in dark mode because it naturally reduces visual noise. Users can quickly scan the interface and focus on what matters.
Always check contrast ratios as you reduce text brightness. Secondary text still needs to meet a 4.5:1 contrast ratio against its background for normal-sized text. Muted text that fails contrast is not subtle; it is unreadable for many users.
Adjust Brand and Accent Colors
Brand colors chosen for light backgrounds often look wrong on dark ones. Saturated colors can vibrate against dark surfaces, and darker colors may disappear entirely.
When adapting accent colors for dark mode:
- Reduce saturation slightly for large colored areas, so they do not feel overwhelming.
- Lighten darker brand colors so they maintain contrast against dark surfaces.
- Test colored text carefully, as colored text on dark backgrounds often fails contrast checks.
- Use color sparingly, reserving it for primary actions, links, and key status indicators.
A bright accent color can be very effective in dark mode precisely because it stands out. A vivid green or blue call-to-action button draws the eye immediately against a dark gray interface. The key is restraint: when everything is colorful, nothing stands out.
Semantic colors for success, warning, and error states also need adjustment. A dark red that works on white may be nearly invisible on near-black, so create dedicated dark-mode variants.
Handle Images and Illustrations
Images behave differently on dark backgrounds. Bright photos can feel like spotlights, drawing attention away from content. Illustrations designed for white backgrounds may have edges, shadows, or white areas that clash with dark surfaces.
Consider these approaches:
- Use images with darker or neutral tones where you control the imagery.
- Add subtle rounded corners and borders to images, so they sit comfortably inside dark cards.
- Provide dark variants of illustrations and logos, especially those with transparent backgrounds and dark lines that disappear on dark surfaces.
- Avoid reducing image brightness globally, since product screenshots and photos need to show accurate colors.
For product marketplaces, showcasing products with dark-friendly preview images can make the entire catalog feel cohesive.
Design Focus and Interaction States
Interaction states need special attention in dark mode, because many default styles were designed with light backgrounds in mind.
Hover states often work well as a subtle surface lightening, matching the layered depth system. A card that becomes slightly lighter on hover feels like it is lifting toward the user.
Focus states must be clearly visible for keyboard users. A focus ring in your accent color, offset slightly from the element, usually works well. Test that focus rings remain visible against every surface level, not just the base background.
Pressed and selected states can use a combination of lighter surfaces and accent color, such as a subtle accent-tinted background with an accent border.
Disabled states should be visibly different but still legible enough to understand what the control is.
Typography Considerations
Text looks slightly different in dark mode. Light text on dark backgrounds can appear thinner and slightly bolder simultaneously, depending on rendering, which affects readability.
A few adjustments help:
- Avoid very thin font weights for body text, as they can break up on dark surfaces.
- Increase line height slightly for long-form content to improve readability.
- Consider slightly larger body text if users will read long passages.
- Choose typefaces with open letterforms and good legibility at small sizes.
Test your typography on real devices, both high-resolution and standard displays, as rendering varies.
Dark-First or Dark-Optional
There are two broad approaches to dark mode: offering it as an option alongside a light theme, or designing dark-only.
Offering both themes respects user preferences and accessibility needs, but it doubles design and testing work. Every component, image, and state needs to work in both modes.
Designing dark-only, as many premium creative tools and marketplaces do, lets you focus on one polished experience. It can strengthen brand identity and make visual products, such as UI kits, photos, or video, look more striking. The trade-off is that users who prefer light interfaces have no choice.
Whichever approach you choose, design dark mode intentionally from the start. Retrofitting it later almost always results in inconsistencies.
Test in Real Conditions
Finally, test your dark interface in the environments where people actually use it. Dark mode is often used at night in dim rooms, but also in bright offices and outdoors.
Check your design at different screen brightness levels, on different devices, and with users who have varying vision. Pay attention to readability of secondary text, visibility of borders and dividers, and how quickly users can find primary actions.
Dark Mode as a Design Discipline
Great dark mode design is not about making things black. It is about building a coherent system of surfaces, text colors, accents, and states that work together in a low-light context.
Use near-black backgrounds, layer surfaces with subtle lightness steps, soften text, adapt brand colors, and test contrast carefully. Done well, dark mode feels calm, premium, and focused, letting content and key actions stand out.