Book a free call

How to Design Dark Mode for a Mobile App

Dark mode is more than flipping an app's colours to black: it needs a palette, contrast rules and testing. Here is how to design a dark theme that stays readable.

Hertiv engineering teamReviewed by a senior engineer
7 min read
How to Design Dark Mode for a Mobile App
On this page

Short answer

Dark mode is a second colour theme for a mobile app that uses dark surfaces with light text instead of light surfaces with dark text. A good dark theme is not an inverted light theme: it uses dark grey surfaces, softer contrast and adjusted brand colours, and it is tested on real devices in low light so text stays readable and nothing glares.

What is dark mode in a mobile app?

Dark mode is a colour theme for a mobile app in which screens use dark surfaces and light text, the opposite of the usual light theme. It is a full second theme, not a filter: every screen, card, button and message needs its own dark version, planned in advance.

Most apps offer dark mode as a choice in settings, and many also follow the phone's system setting, switching automatically when the user changes the system theme. Some apps go further and let the theme change by time of day, turning dark in the evening and light in the morning.

Dark mode is not the same as a night filter that warms the screen colour. A filter changes the hue of everything on screen, while a dark theme is a separate set of colours chosen for each element. That is why a dark theme takes real design work: colours, shadows, images and brand elements all have to be rethought. For the wider design process, see how to design a mobile app.

Why do users switch dark mode on?

Users switch dark mode on for comfort, habit and battery life, and the mix varies by person. In a dark room, a bright white screen feels harsh, so a dark screen is easier on the eyes during evening use. Many people also simply prefer how dark screens look, and once they are used to it they expect every app to offer it.

On phones with OLED screens, dark mode can also save battery. OLED pixels that show black are switched off, so a mostly dark screen draws less power than a bright one. The saving depends on how much of the screen is truly dark and how long the screen stays on, but for apps people use for hours a day it is a real benefit.

There is also an accessibility angle. Some users with light sensitivity find bright screens painful, and a well-made dark theme gives them a way to use the app comfortably. That makes dark mode a feature worth designing properly rather than an afterthought bolted on at the end.

What colours work in dark mode?

The colours that work in dark mode are dark greys rather than pure black, with muted accents and restrained use of bright colour. Pure black backgrounds create harsh contrast with white text and make depth hard to show, because a shadow cannot be seen on black. A very dark grey, around #121212, is the usual starting point.

Depth is shown by making surfaces lighter as they rise. A screen background is the darkest layer, a card sitting on it is a little lighter, and a sheet or dialog on top of the card is lighter still. This layered approach replaces the shadows used in light themes, which do not read well on dark backgrounds.

LayerTypical colourWhat it is used for
BackgroundVery dark greyMain screen surface
CardDark grey, one step lighterLists, tiles and panels
Raised sheetDark grey, two steps lighterDialogs, menus and sheets
AccentMuted brand colourButtons, links and highlights

Brand colours usually need adjusting too. A vivid brand colour that looks good on white can look too bright on dark grey, so most teams use a lighter, softer version of the same colour for dark mode. The aim is a theme that still feels like the same brand, just built for the dark.

How do you keep text readable in dark mode?

You keep text readable in dark mode by controlling contrast carefully: main text should be a soft off-white rather than pure white, and secondary text should use a dimmer grey. Pure white text on a near-black background can glow and tire the eyes, so most dark themes use a white at around 87 percent opacity for headings and body text.

Secondary text, such as captions and hints, sits at a lower opacity, around 60 percent, and disabled text lower still. The key rule is that text which must be read easily should keep a contrast ratio of at least 4.5 to 1 against its background, the same standard used for light themes.

Long passages of text deserve extra care. A slightly larger line height and a font weight that is not too thin help in low light, and links should be clearly marked with colour plus an underline or a clear label, since colour alone can be hard to tell apart on dark surfaces.

Test the theme on a real phone in a dim room, not only on a bright monitor, because that is where problems show up. For the design errors that show up in both themes, see the common UX pitfalls in mobile app design.

How do you handle images, icons and brand colours?

You handle images, icons and brand colours in dark mode by giving each one a dark version or a treatment that works on dark surfaces. Photographs usually stay as they are, but a photo with a white background will look like a bright hole in a dark screen, so teams often add a subtle dark border or a tinted backdrop behind it.

Icons should be drawn for dark mode rather than simply inverted. Thin line icons can disappear on dark grey, so icon strokes are often made slightly thicker and the colour softened to off-white. Logos need the same care: a logo designed for a white background may need a light version, or a dark tile behind it, to stay legible.

Brand colours are the trickiest part. A strong brand red or blue can vibrate against dark grey, so most teams create a dark-mode version of each brand colour that is lighter and less saturated. The brand still reads as the same brand, but it no longer shouts.

Keep the palette small: one primary accent, one or two supporting colours, and greys for everything else. A restrained palette also fits the minimal approach to app design.

How do you add dark mode in 6 steps?

You add dark mode by designing the palette first, then converting every screen, then testing on real devices. Skipping the palette step is the most common cause of a dark theme that looks patched together.

  1. Define the dark palette. Pick the background greys, surface steps, text opacities and adjusted brand colours, and write them down as named tokens.
  2. Map every light colour to a dark one. Go through the design system and give each colour token a dark value, including borders, dividers and shadows.
  3. Convert the screens. Apply the dark tokens to each screen, starting with the screens people use most, and check each one in both themes.
  4. Fix images, icons and logos. Add dark versions where needed and check that nothing disappears or glares.
  5. Wire up the switch. Support the system setting, add a manual choice in settings, and remember the user's choice between sessions.
  6. Test in low light. Check every screen on a real phone in a dim room, and fix contrast and legibility problems before release.

Keep both themes in the design system from then on. Every new screen should be designed in light and dark together, so the two themes never drift apart again.

Example (hypothetical): a food delivery app adds dark mode

Example (hypothetical): a food delivery app with 40 screens decides to add dark mode. The design team starts by defining 12 colour tokens: 3 background greys, 3 surface steps, 3 text opacities, 2 brand colours and 1 error colour. That takes one week.

Converting the screens takes longer. The team converts 8 screens a week, so 40 screens take 5 weeks. Testing finds 14 contrast problems, mostly captions that are too dim and one bright banner image. Fixing those takes another week, so the whole job takes 7 weeks.

After launch, 6 in 10 users turn dark mode on, and evening orders rise by a small amount. The team cannot prove dark mode caused the rise, since other changes shipped at the same time, but support tickets about eye strain fall from 12 a month to 3. The lesson the team takes away is that the palette work up front saved far more time than it cost.

What are the common mistakes?

The most common dark mode mistakes are inverting the light theme, using pure black everywhere, and forgetting to test in low light. Each one is easy to make and easy to avoid with a planned palette.

  • Inverting the light theme. A simple colour inversion produces muddy colours and unreadable text; design the dark palette from scratch.
  • Pure black backgrounds. Pure black kills depth and makes white text glare; use dark grey and show depth with lighter surfaces.
  • Text that is too dim. Secondary text at very low opacity becomes unreadable; keep the contrast ratio above 4.5 to 1 for anything that must be read.
  • Forgetting images and logos. White-backed images and dark logos look broken on dark screens; give each a dark version.
  • No system-setting support. Users expect the app to follow the phone's theme; a manual toggle alone feels unfinished.
  • Testing only on a bright monitor. Dark mode is used in dim rooms, so test it there, on a real phone.

Key takeaways

  • Dark mode is a second theme, not an inverted light theme
  • Use dark greys for surfaces and show depth with lighter layers, not shadows
  • Keep main text at high contrast and secondary text above 4.5 to 1
  • Give images, icons and brand colours their own dark versions
  • Support the system setting and test on a real phone in a dim room

Frequently asked questions

Is dark mode just an inverted light theme?

No. A simple inversion produces muddy colours, unreadable text and brand colours that clash. A proper dark theme is a separate palette: dark grey surfaces, lighter raised layers, softer text and adjusted brand colours, designed as its own system.

Does dark mode save battery?

It can, on phones with OLED screens, because black pixels are switched off and draw no power. The saving depends on how much of the screen is dark and how long the screen stays on. On LCD screens, where a backlight stays on, dark mode saves little or no battery.

What is the best background colour for dark mode?

A very dark grey, around #121212, is the usual starting point rather than pure black. Pure black makes depth hard to show and white text can glare against it. Dark grey lets you show raised surfaces as lighter layers, which gives the screen depth.

Should an app follow the system theme?

Yes, in most cases. Users who turn dark mode on for their phone expect apps to follow it. Offer a manual choice in settings too, for people who want the app to differ from the system, and remember the choice between sessions.

How do you test a dark theme?

Test on a real phone in a dim room, not only on a bright monitor. Check every screen for contrast, read long passages of text, and look at images, icons and logos. Fix captions that are too dim and any bright element that glares.

Do brand colours need to change in dark mode?

Usually, yes. A vivid brand colour that works on white can look too bright on dark grey, so teams use a lighter, less saturated version of the same colour. The brand should still be recognisable, just calmer on a dark surface.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: software products in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning a mobile app with a dark theme? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Mobile App Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to contact@hertiv.com.

Prefer email? Write to contact@hertiv.com
Estimate costBook a call