Skip to content
Bugwise
Menu
Features & Flows

Dark Mode

How system and in-app themes work on iOS, Android and the web, what breaks when the colors flip, and how to test dark mode properly.

40–60 min beginner Mobile & web

It’s 11 p.m. A customer opens their banking app in bed to check a payment. The phone is in dark mode, the app is in dark mode… except for one card in the middle of the screen, where the “Pending: €1,250” text is black on dark grey. The customer can’t read it, assumes the money is gone, and calls support in a panic.

Nothing “crashed”. No test case failed. The app simply was never checked with the lights off. dark modeDark modeA display setting that uses light text on dark backgrounds.Open in glossary → looks like a cosmetic setting, but a lot of people keep it on all day, and it touches every screen, every color and every image in your product. That makes it one of the easiest places for a new tester to find real, visible bugs.

Part Not started

How it works

A theme is just a set of colors. Light mode uses dark text on light backgrounds, dark mode flips that. The interesting part for testers is who decides which theme the user gets, and when it changes.

  1. The system has a setting. iOS (Settings › Display & Brightness), Android 10+ (Settings › Display › Dark theme) and desktop operating systems all have Light, Dark and often an Automatic option that switches at sunset or on a schedule.
  2. The app reads the system setting. On launch, the app asks the OS “light or dark?” and picks its colors. Well-built apps use semantic colorsSemantic colorA named color such as 'label' or 'background' that has a light and a dark value.Open in glossary → like “label” or “background” that have a light and a dark value, instead of one fixed color such as pure black (written #000000 as a hex code, the six-character way of writing a color for screens).
  3. The app may have its own setting. Many apps offer Settings › Appearance: System / Light / Dark. “System” follows the phone. “Light” or “Dark” overrides it, and the choice must be saved so it survives a restart.
  4. The theme can change while the app is open. Automatic mode flips at sunset, or the user opens Control Center or Quick Settings and taps Dark mode. The app must redraw every visible screen without losing what the user was doing.
  5. Websites follow the browser. A site asks the browser whether the user prefers light or dark, and the browser takes the answer from the operating system (some sites also offer their own toggle). In CSS this preference is called prefers-color-scheme; you’ll meet that name in DevTools and in bug reports. If the theme is applied too late, the page flashes whiteFlash of unstyled contentThe page briefly shows the wrong styles or theme before the right ones load.Open in glossary → before turning dark.

Who wins: system or app?

Phone settingIn-app settingThe user should see
LightSystemLight
DarkSystemDark
DarkLightLight (the app overrides the phone)
LightDarkDark

That’s four combinations already, and each one should survive a restart, a theme change while the app is open, and a fresh install. Try them in the lab below.

Switching while the app is open

This is where the platform differences show up:

Try it: the theme lab

Flip the phone’s appearance, the in-app setting and Increase contrast. The badge shows which theme the user actually gets. Then pick an element and measure its contrast ratioContrast ratioHow different text and background colors are; WCAG asks for at least 4.5:1 for normal text.Open in glossary → in both themes. That’s a number for how much a color stands out from its background: 1:1 means the two are the same color (invisible), 21:1 is black on white, and normal text needs at least 4.5:1. The sample screen has a few realistic flaws in its default colors. Can you find which elements fail, and in which theme?

Phone appearance

In-app setting

Accessibility

The user sees the light theme. The in-app setting is "System", so the app follows the phone: light.

Light themeOn screen
9:41

Wallet

Updated 2 min ago

Balance

€2,480.15

Search payments
RecentSee all
Send money
Dark theme
9:41

Wallet

Updated 2 min ago

Balance

€2,480.15

Search payments
RecentSee all
Send money

Contrast checker

light #6b7280 on #ffffff4.83:1 Pass
dark #6b7280 on #0000004.34:1 Fail

Text: WCAG AA needs at least 4.5:1 for normal-size text. The dashed outline shows the measured element.

Example requirements

Notice criteria 3 and 9: they’re about timing, not colors. Many teams test the “steady state” of each theme and never the moment of switching.

Check this part

  1. The phone is set to Dark. In the app, Settings › Appearance is set to Light. What should the user see?

  2. On Android, you switch to dark mode while writing a review and the text disappears. Why is this common?

  3. A grey caption has 4.8:1 contrast on white and 4.3:1 on black. Which statement is true?

The system setting and an optional in-app setting decide the theme, and it can change while the app is open.

Part Not started

What usually goes wrong

Hard-coded text color

Order #4821

Your rider is 4 minutes away

color: #111111 /* hard-coded */

The card background follows the theme, but the text was set to a fixed near-black. In dark mode the most important line on the screen disappears.

Semantic color

Order #4821

Your rider is 4 minutes away

color: label /* semantic */

A semantic color like “label” has a light and a dark value, so the text flips together with the card.

Dev note
iOS: the label color. Android: ?attr/colorOnSurface.
#BugWhat you seeTypical severity
1Hard-coded colorsBlack text on a dark card, or a white box on a black screenHigh (text unreadable)
2Images with baked-in colorsA black logo on a transparent PNG vanishes; an icon with a white rectangle behind itMedium
3Shadows instead of bordersCards separated only by a shadow blend into the dark backgroundLow–Medium
4Low-contrast greysCaptions, placeholders and disabled text pass in light, fail in darkMedium–High
5Selected state disappearsSelected tab, chip or day looks like all the othersHigh
6Status bar iconsBlack clock and battery on a black headerMedium
7Web views and emailsWeb pages shown inside the app (help, receipts, ads) and HTML emails stay bright whiteMedium
8ChartsGridlines, labels or a dark series line vanishMedium
9Brand colorsA dark navy button or link becomes unreadable on blackMedium
10Third-party screensPayment, login or chat screens that come from another company (an SDK) stay light or mix themesLow–Medium
11In-app setting not saved“Light” is selected in Settings, but the app is dark after a restartMedium
12State lost on switchAndroid: typed text or scroll position reset when the theme changesHigh
13Web flash of wrong themeThe page shows white for a moment before turning darkLow–Medium

Don’t forget the places outside the app’s own screens: screenshots in the help center or app store listing (do you need dark versions?), push notificationPush notificationA message an app sends to the device that appears even when the app is closed.Open in glossary → images, and widgets, which follow the system theme even when the app has its own setting.

Find the bug

PulseFit, a fitness app, just shipped dark mode. The app and its website below have six bugs. Explore like a tester:

  • Switch the system appearance to Dark and look carefully at every part of the Today screen.
  • Tap the Today / Week / Month chips in both themes.
  • In Settings, choose Light or Dark, then Restart app.
  • Open the Website in dark mode and reload it. Watch closely.

🐞 Bug hunt: PulseFit dark mode

This demo has 6 hidden bugs. Explore it like a tester, then check your findings.

Found0/6
9:41
PulseFitMK

Good morning, Mia

Tuesday, 14 October

6,240

Steps

410

kcal

38 min

Active

Weekly summary

You were active 5 of 7 days. Two more workouts and you hit your monthly goal!

Sponsored

FuelBox

Protein bars, 20% off

Code PULSE20 at checkout. Ends Sunday.

Shop now

Device

System appearance (Control Center / Quick Settings)

Open

From the spec

The app and website support light and dark themes. By default they follow the system. In the app, Settings › Appearance can force Light or Dark, and the choice is remembered.

  1. 1

    Hint: Switch the system to Dark and read every card on the Today screen.

  2. 2

    Hint: Look at the top-left corner in dark mode.

  3. 3

    Hint: Tap Today, Week and Month with the system set to Dark.

  4. 4

    Hint: Scroll to the Sponsored block in dark mode.

  5. 5

    Hint: In Settings choose Light while the system is Dark, then tap Restart app.

  6. 6

    Hint: Open the Website with the system set to Dark, then tap Reload page.

Check this part

  1. The company logo disappears in dark mode, but the app looks fine otherwise. What is the most likely cause?

  2. Why does black text sometimes vanish on a dark card?

Hard-coded colors, vanishing logos, low-contrast greys and other typical dark mode bugs, then a buggy app to explore.

Part Not started

Test scenarios

Before you start, set up three things:

  • A fast way to switch the theme. You’ll flip it dozens of times, so use the phone’s quick toggle (Control Center on iOS, Quick Settings on Android) instead of digging through Settings. The last part of this lesson lists the shortcuts for phones, simulators and browsers.
  • The app’s own Appearance setting, if it has one, back on System at the start of each test.
  • A way to measure contrast. You need two colors, the text and its background: read them from the design file, ask the designer, or take a screenshot and pick them with any color picker. Type both into a free contrast checker (for example the WebAIM Contrast Checker) and it gives you the ratio. On a website, the browser’s DevToolsDevToolsDeveloper tools built into browsers for inspecting pages, network traffic and errors.Open in glossary → show the ratio when you inspect a text color.

Functional

  • With the in-app setting on System, switch the phone between Light and Dark: the app follows.
  • Choose Light and Dark in the app’s settings: the change applies immediately, on every screen, including the screens you came from (go Back and check them).
  • Close, restart and update the app: the in-app choice is remembered (this is state persistenceState persistenceWhether the app remembers what the user did after navigating away, rotating, or restarting.Open in glossary →).
  • Automatic mode: in the phone’s display settings, set a custom dark mode schedule that starts a minute or two from now, then wait for the switch with the app open.
  • The website follows the system theme and, if it has its own toggle, remembers the choice after a reload.

Switching at the worst moment

Visual and contrast

Embedded and external content

Accessibility

Check this part

  1. Which moment do teams most often forget to test?

  2. Which contrast does an icon, border or focus ring need?

Check following the system, the in-app override, switching at the worst moment, contrast, embedded content and accessibility.

Part ProNot started

Example test cases

These cases are written for PulseFit, the fitness app from the requirements. What you need: a phone with the quick theme toggle within reach, and for TC-DARK-004 a contrast checker (see the start of Test scenarios). TC-DARK-007 is for the website and uses the browser’s DevTools; if you haven’t used them yet, read DevTools for testers first or leave that case for later.

TC-DARK-001App follows the system theme by default

Preconditions

  • Fresh install
  • In-app Appearance is "System"

Steps

  1. Set the phone to Light and open the app
  2. Switch the phone to Dark from Control Center / Quick Settings
  3. Return to the app

Expected result

The app is light first, then dark on every visible screen. No restart is needed.

TC-DARK-002In-app Light override survives a restart

Preconditions

  • Phone is set to Dark

Steps

  1. Open Settings › Appearance and choose Light
  2. Force close the app
  3. Open the app again

Expected result

The app opens in Light. Settings shows Light as selected.

TC-DARK-003Typed text survives a theme change

Preconditions

  • In-app Appearance is "System"

Steps

  1. Open Write a review and type two sentences
  2. Scroll the screen down a little
  3. Switch the phone to Dark mode
  4. Return to the app

Test data

Optional, if you use adb on Android: adb shell cmd uimode night yes switches to dark without leaving the app

Expected result

The screen is dark. The text, cursor position and scroll position are unchanged.

TC-DARK-004Text contrast in dark mode

Preconditions

  • Phone is set to Dark
  • A contrast checker, and the color values from the design file or a screenshot

Steps

  1. Open the Home screen
  2. Measure body text, captions, links and button labels with a contrast checker

Expected result

Every text element is at least 4.5:1 (3:1 for large text). Icons and field borders are at least 3:1.

TC-DARK-005Selected state is visible in both themes

Steps

  1. In Light mode, tap Week in the range selector
  2. Switch to Dark mode
  3. Tap Month

Expected result

In both themes the selected chip is clearly different (fill, border or checkmark) from the others.

TC-DARK-006Embedded web content matches the theme

Preconditions

  • Phone is set to Dark

Steps

  1. Open Help, Terms and the Sponsored offer
  2. Open an order receipt

Expected result

All embedded pages use a dark background with readable text. No full-white panels.

TC-DARK-007Website shows the right theme from the first frame

Preconditions

  • OS (or DevTools emulation) set to dark
  • Network throttled to Slow 4G

Steps

  1. Open the home page in a new tab
  2. Reload with the cache disabled
  3. Watch the first frames (or record a performance profile with screenshots)

Expected result

The page is dark from the very first frame. No white flash.

Tip: click a test case to expand it.

Check this part

  1. The in-app setting is Light and you restart the app. What is expected?

  2. What should a website in dark mode show on its very first frame?

Test cases: following the system, the in-app override, typed text across a switch, contrast, selected states, web content and the website's first frame.

The rest of this lesson is in Bugwise Pro

The last parts of every lesson are part of Bugwise Pro. Sign in to unlock them if you have it.

Part ProNot started

Mobile vs web

  • Switch fast: iOS Control Center (long-press brightness › Dark Mode), Android Quick Settings tile Dark theme. You’ll switch dozens of times, so put the tile where you can reach it.
  • SimulatorsSimulatorSoftware that imitates a device's behavior on your computer, like Apple's iOS Simulator.Open in glossary → and emulatorsEmulatorSoftware that imitates a real device's hardware and OS on your computer, like the Android Emulator.Open in glossary →: in the iOS Simulator use Features › Toggle Appearance (Shift+Cmd+A). An Android emulator has the same Quick Settings tile as a real phone. See Simulators and emulators.
  • Optional, from a terminal: xcrun simctl ui booted appearance dark for the iOS Simulator, and adb shell cmd uimode night yes on Android (no to go back). The Android command switches the theme without leaving the app, which is handy for lost-state tests. New to adb? See ADB basics.
  • Android recreates the screen on a theme change, so it’s your best tool for finding lost-state bugs. Fill in forms, then switch.
  • iOS Automatic mode switches at sunset. Developers rarely test the switch happening while the app is open.
  • Status bar: if the app forces dark status bar content, the clock and battery become invisible on dark headers. Check every screen, especially full-screen images and video.
  • Widgets and notifications follow the system theme, even if the app has its own setting.
  • Third-party screens (payment, chat or map components made by other companies, called SDKs) may not support dark mode, or may follow the system while your app is forced to Light. Mixed themes look broken to users.
  • Compare platforms: on Android, check both a Pixel and a Samsung device. Manufacturer skins can add their own dark options (see iOS vs Android).

Check this part

  1. Which tool lets you test a website in dark mode without changing your computer settings?

  2. The app is forced to Light in its own settings. What may still follow the system theme?

Quick ways to switch themes on phones, simulators and in DevTools, and what differs between apps and websites.

The rest of this lesson is in Bugwise Pro

The last parts of every lesson are part of Bugwise Pro. Sign in to unlock them if you have it.

Checklist

Dark mode checklist

0 of 14 checked

Key takeaways

  • Dark mode has two switches: the system setting and (often) an in-app System / Light / Dark setting. The in-app choice wins and must be remembered.
  • Test the moment of switching, not just each theme: Android recreates the screen (a configuration change), iOS keeps it but cached drawings can stay in the old theme, and websites update without a reload.
  • The classic bugs: hard-coded colors, vanishing transparent logos, low-contrast greys, invisible selected states, white web views, unreadable status bars and a white flash on websites.
  • Measure contrast in both themes: 4.5:1 for text, 3:1 for icons, borders and focus rings.
  • Don’t forget content you didn’t build: web views, emails, charts, widgets and third-party screens.

Finished this page?Nice work, this page is complete!

Mark it as done to track your progress. It's saved in this browser, no account needed.

Its cards are now in your Bites review ⚡
Esc

Type to search the whole site.