Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Dark mode making text invisible: how to find and fix it

PRF-201Medium impactCould addBy FunnelGuardPublished Updated
On this page

What this issue is

Most phones and computers let people choose a dark theme. Browsers tell your site about that choice through a CSS media query called prefers-color-scheme. If your theme, a plugin or an embedded widget reacts to it, some colours flip to dark and others do not.

The result is a mismatch. Typical cases: a dark theme sets body text to near-white but a section keeps a hard-coded white background; a form field gets a dark background from the browser while your CSS forces dark text; or a logo or icon in dark ink sits on a dark header.

How a dark mode mismatch loses a lead
  1. Ad clickVisitor lands on the page
  2. Dark mode onDevice sends prefers-color-scheme: dark
  3. Text unreadableDark text on a dark background, or white on white
  4. Form filledVisitor cannot see labels or what they type
  5. Lead or saleNever happens

The visitor reaches the form, but cannot read it.

Why it costs you leads or sales

Visitors rarely tell you the page was unreadable. They just leave. Because dark mode is a device setting, your own team may never see the problem if everyone uses a light theme. Ad clicks you paid for land on a page that looks empty or broken.

The damage is worst where it matters most: prices, button labels, form fields, error messages and consent banners. An invisible submit button or an unreadable field means no conversion, and your analytics will show a normal page view followed by an exit.

Form completion by visitor themeExample numbers
Form completion by visitor theme (example)Light mode visitors: 4.2 %; Dark mode visitors (broken): 1.1 %; Dark mode visitors (fixed): 4 %0234.21.14Light mode visitorsDark mode visitors (b…Dark mode visitors (f…%

Example: illustrative numbers showing how an unreadable form can drag down completion for dark mode visitors only.

How to check if your site has it

You do not need a dark phone. Chrome, Edge and Firefox can pretend to be in dark mode, and so can your operating system.

Test your key pages in dark mode
  1. Emulate dark mode in Chrome or EdgeChrome / Edge

    Open DevTools (F12), press Ctrl/Cmd+Shift+P, type 'Render', choose 'Show Rendering', then set 'Emulate CSS media feature prefers-color-scheme' to dark.

  2. Emulate dark mode in FirefoxFirefox

    Open DevTools, go to the Inspector, and click the moon icon in the top right of the rules panel to simulate prefers-color-scheme: dark.

  3. Switch your real device

    On iPhone use Settings > Display & Brightness > Dark. On Android use Settings > Display > Dark theme. On Windows and macOS change the system appearance.

  4. Walk the funnel

    Check landing page, form fields (type in them), dropdowns, error messages, checkout, cookie banner, popups, chat widget and thank-you page.

  5. Look at third-party parts

    Embedded forms, booking widgets and payment iframes often have their own theme. Check each one separately.

How to fix it

There are two sound approaches. Either support dark mode properly by defining both colours together, or opt out and keep your page light. Never set only the text colour or only the background.

Colours set in pairs

Broken

  • Body text turns white in dark mode
  • Cards keep a hard-coded white background
  • Input text colour forced dark on a dark field
  • Dark logo disappears on dark header

Fixed

  • Every text colour has a matching background
  • Colours come from shared CSS variables
  • Inputs set colour and background together
  • Logo has a light variant for dark mode
Define colours once and switch them togethercss
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --text: #1a1a1a;
  --field-bg: #ffffff;
  --field-text: #1a1a1a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #f2f2f2;
    --field-bg: #1e1e1e;
    --field-text: #f2f2f2;
  }
}

body { background: var(--bg); color: var(--text); }

input, textarea, select {
  background: var(--field-bg);
  color: var(--field-text);
}
Option B: keep the page light for everyonecss
:root {
  color-scheme: only light;
}

body { background: #ffffff; color: #1a1a1a; }
Declare supported schemes in the headhtml
<meta name="color-scheme" content="light dark">
Fix it on your platform
  1. Find the source

    Switch your theme or plugin dark mode off if you do not want it (check Appearance > Customize and the plugin settings). Test again in emulation.

  2. Add override CSS

    Go to Appearance > Customize > Additional CSS (or the block theme Site Editor > Styles > Additional CSS) and paste the paired colour rules for the broken elements.

  3. Check form plugins

    In your form plugin's style settings, set both field text and field background colours explicitly.

Swap a logo for dark modehtml
<picture>
  <source srcset="/logo-light.svg" media="(prefers-color-scheme: dark)">
  <img src="/logo-dark.svg" alt="Your company" width="160" height="40">
</picture>
Try it: mismatched colours in dark modeInteractive
Text and background set separately

Mismatched

Leads or data lost

Dark mode flips the text to light but a card keeps its white background. Labels and prices are unreadable and visitors leave.

Toggle to see why colours must change in pairs.

How to confirm it's fixed

Dark mode verification
  • Headings, body text, prices and links readable in emulated dark mode
  • You can see what you type in every form field
  • Placeholder text and error messages are visible
  • Buttons show a clear label in normal and hover states
  • Logo and icons stand out on their backgrounds
  • Cookie banner, popups and chat widget are readable
  • Embedded forms and payment frames checked
  • Light mode still looks right
  • Checked on one real iPhone or Android phone in dark theme

How to prevent it happening again

Add dark mode to your release routine. Every new section, popup, plugin or theme update can reintroduce the clash, because each one brings its own colours.

Habits that keep it fixed
  • Use CSS variables for colours so pairs change together
  • Add 'test in dark mode' to your page launch checklist
  • Re-test after theme, plugin and widget updates
  • Ask agencies and freelancers to provide dark mode screenshots
  • Pick tools that let you set both field text and background colours

How FunnelGuard handles this

FunnelGuard does not check this yet. Dark mode readability is a possible future check, so today a dark mode clash will not trigger a FunnelGuard alert.

What FunnelGuard does cover nearby: a robot visitor runs your real journeys, such as lead forms and checkouts, on a schedule from the EU or the US. It checks each step, the tracking hits to ad and analytics platforms, and whether test leads reach your inbox and CRM. If a dark mode bug ever grew into a blocked button or a broken step, that failure could surface, but it will not tell you the cause is colour.

To watch for dark mode problems yourself, use the DevTools emulation steps above on your key pages after each change, and keep a phone in dark mode for spot checks. The free read-only website audit and the Free plan (1 site, 2 journeys, daily checks, no card) can help you monitor the journeys themselves.

Questions people ask

Why is my website text invisible in dark mode?

Usually only part of your colour pair changes. The text switches to a light colour but a section keeps a hard-coded white background, or the reverse. Set text and background colours together, ideally with CSS variables, and test with dark mode emulation.

How do I test my website in dark mode without changing my device?

In Chrome or Edge, open DevTools, choose Show Rendering and set Emulate CSS media feature prefers-color-scheme to dark. In Firefox use the moon icon in the Inspector rules panel. This shows how your page looks to dark mode visitors.

Why can't I see what I type in my form in dark mode?

The browser may give the field a dark background while your CSS forces dark text, or the reverse. Set both color and background on input, textarea and select elements, using colours that contrast strongly.

How do I stop my website using dark mode?

Add color-scheme: only light to your root CSS and set explicit background and text colours. Some themes also have a dark mode setting you can switch off. Test afterwards, since embedded widgets may still follow the device theme.

What does the color-scheme meta tag do?

It tells the browser which themes your page supports, such as light dark. The browser then styles default elements like form controls and scrollbars to match. You still need to set your own colours in pairs.

Does dark mode affect conversions?

It can when it makes forms, prices or buttons unreadable. Because it only affects visitors using a dark theme, the loss is easy to miss in overall numbers. Compare conversion by device if your analytics allows it.

Does FunnelGuard detect dark mode problems?

No. FunnelGuard does not check dark mode readability yet; it is a possible future check. It does run your real funnel journeys on a schedule, so test manually with browser emulation in the meantime.

Does FunnelGuard catch this?

Could add

Not checked yet: could be added to FunnelGuard.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.