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.

35 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.

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 colors like “label” or “background” that have a light and a dark value, instead of fixed colors like #000000.
  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 reads the CSS media feature prefers-color-scheme, which the browser takes from the operating system (some sites also offer their own toggle). If the theme is applied too late, the page flashes white 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. 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.

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” (iOS) or ?attr/colorOnSurface (Android) has a light and a dark value, so the text flips together with the card.

#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 emailsHelp pages, receipts, ads or 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 SDK screens 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 notification 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.

Test scenarios

Functional

Switching at the worst moment

Visual and contrast

  • Walk through every screen in both themes, including empty, loading, error and disabled states. Use the Accessibility basics contrast rules: 4.5:1 for text, 3:1 for icons, borders and focus rings.
  • Selected tabs, chips, toggles, radio buttons and calendar days are clearly different from unselected ones (compare with the segmented control page).
  • Logos, illustrations, avatars and product photos: nothing vanishes, nothing sits in a white box.
  • Cards and sheets are still separated from the background (shadows barely show on black).
  • Charts: lines, labels, gridlines and legends are readable.
  • Status bar and Android navigation bar icons are readable on every screen.

Embedded and external content

  • Web views (help, terms, offers), in-app emails and receipts, rich push notifications and home screen widgets.
  • Third-party screens: payment sheets, social login, chat support, maps, ads. Write down which ones you can’t change, and report them anyway so the team can decide.
  • Screenshots and images in the help center and store listing.

Accessibility

  • Turn on Increase Contrast (iOS) or High contrast text (Android) together with dark mode.
  • Combine dark mode with large text (Dynamic Type or font size): nothing overlaps or gets cut off.
  • The focus ring on the web is visible on dark backgrounds.
  • Information is never shown by color alone (a red/green status needs text or an icon too).

Example test cases

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

Android: also try adb shell cmd uimode night yes

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

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.

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.
  • Simulators and emulators: in the iOS Simulator use Features › Toggle Appearance (Shift+Cmd+A). From a terminal: xcrun simctl ui booted appearance dark. On Android: adb shell cmd uimode night yes (and no to go back). See Simulators and emulators.
  • 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 SDKs (payments, chat, maps) 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).
  • Emulate without changing your OS: Chrome DevTools › More tools › Rendering › “Emulate CSS media feature prefers-color-scheme”. Firefox’s Inspector has light and dark simulation buttons. See DevTools for testers.
  • Flash of the wrong theme: reload with the cache disabled and a throttled network. Pages that apply the theme with JavaScript after load, or read a saved choice from local storageLocal storageBrowser storage where websites keep data that survives closing the tab, like settings or a cart.Open in glossary → too late, flash white first.
  • Native controls: scrollbars, checkboxes, date pickers and dropdowns can stay light on a dark page.
    Dev note
    That happens without the color-scheme CSS property (or meta tag).
  • Site toggle vs system: if the site has its own Light/Dark/System switch, test all combinations, a reload, and a second tab.
  • Emails in Gmail, Outlook and Apple Mail each darken HTML emails differently: logos with transparent backgrounds and dark text in images are common casualties.
  • Cross-browser: check Chrome, Safari and Firefox, and phone browsers in dark mode (Cross-browser testing).
  • Print a page from dark mode: it should print with a light background, not a page of black ink.

Checklist

Dark mode checklist

0 of 14 checked

Check your understanding

Quick quiz

0/5 answered · 0 correct

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

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

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

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

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

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 sends a trait change, the web updates through prefers-color-scheme.
  • 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 review cards are now in Bites ⚡
Esc

Type to search the whole site.