Lorixen.
EN

Adding dark mode to a business website without breaking the brand

Short answer: Many business sites don't need dark mode, but products people use for long stretches (dashboards, booking portals, documentation, reading-heavy blogs) often benefit. If you add it, start by following the visitor's system setting with prefers-color-scheme, declare color-scheme so browser controls match, and prepare dark versions of your logo and key images. Add a manual toggle only if your audience is likely to want a different theme from their system, and remember the choice.

Dark mode requests usually arrive from someone on the team whose phone is set to dark and who finds the bright white site jarring at night. That's a fair point, but a rushed dark theme can turn a carefully chosen brand palette muddy, make logos vanish against black, and leave form fields glowing white. Decide deliberately, then build it properly.

Step 1: Do you need it at all?

Walk through these questions in order.

Do visitors spend long sessions on the site?

  • No (a brochure site, a restaurant menu, a contact page): dark mode is a nice touch, not a priority. Skip it unless the brand already leans dark.
  • Yes (a customer portal, booking app, knowledge base, long articles): continue.

Is your audience likely to browse at night or in dim rooms? Think of a sleep clinic's patient portal or a late-night food ordering app. If yes, dark mode has real comfort value. Continue.

Can you maintain two themes? Every new component, banner and image needs checking in both. If nobody will own that, a half-finished dark mode is worse than none. If you can, continue.

Does your brand survive on dark? Some palettes translate easily; others rely on a white background to look right. Mock up the homepage and one key page in dark before committing.

If you've reached this point, move to Step 2.

Step 2: Automatic only, or automatic plus a toggle?

Automatic only. The site follows the visitor's operating system or browser setting. MDN's prefers-color-scheme reference explains that this media feature detects whether the user has asked for a light or dark theme through an operating system or browser setting. The value light also covers people who haven't expressed a preference. This is the simplest option and right for most sites.

Automatic plus a toggle. web.dev's dark mode article points out that some people like a dark operating system but prefer websites the way they're used to seeing them. Its recommended pattern: follow prefers-color-scheme first, then let users override it. Choose this if your audience spends long sessions with you, or if your brand's dark version is a significant departure.

Dark only. Rarely right for a business site unless the brand itself is dark.

Implementation notes

Build on color variables

Before writing any dark styles, make sure every color in your CSS comes from a variable (background, surface, text, muted text, border, accent, link). Dark mode then means redefining those variables inside a @media (prefers-color-scheme: dark) block, not hunting through hundreds of rules.

Don't just invert. Pick a dark background that isn't pure black, a text color that isn't pure white, and adjust your accent colors so they still feel like your brand. web.dev notes that its own dark theme avoids pure white, using a slightly darker white such as rgb(250, 250, 250) to prevent glowing against dark surroundings.

Declare color-scheme

The color-scheme property tells the browser which schemes an element can be rendered in, so it can adjust the canvas, scrollbars, form controls and other built-in UI. Without it, you can end up with a dark page and bright white text inputs. MDN also recommends adding <meta name="color-scheme"> in the page head before any CSS, to inform the browser early and help prevent an unwanted flash. Setting color-scheme: light dark on the root is the usual starting point.

Logos and icons

  • SVG logos: use currentColor or CSS variables for fills so they switch with the theme.
  • Raster logos: prepare a version for dark backgrounds, with a light wordmark or a subtle backing shape.
  • Partner and certification badges often come only in dark-on-white; place them on a light card in dark mode rather than recoloring someone else's logo.

Photos and illustrations

Two techniques from web.dev:

  • Swap images using <picture> with a <source> whose media attribute is (prefers-color-scheme: dark). Useful for diagrams, screenshots and illustrations with white backgrounds.
  • Tone down photos with a CSS filter in dark mode. web.dev's example applies a light greyscale filter to non-SVG images so bright photos don't overpower dark pages.

For product photos on white backgrounds, a slightly off-white card behind the image often looks better than a filter.

Check contrast in both themes

Run contrast checks on body text, muted text, links, buttons, focus outlines and error messages in both themes. Muted grey text and colored links are the usual failures in dark mode. Check hover and focus states too, not just default states.

The toggle and remembering the choice

If you add a toggle:

  • Offer three states if you can: Light, Dark and System (follow the device).
  • Store the choice in the browser (local storage or a cookie) and apply it before the page renders, so returning visitors don't see a flash of the wrong theme.
  • Put the toggle somewhere predictable, such as the header or footer, with a clear label rather than an icon alone.

web.dev mentions a ready-made <dark-mode-toggle> custom element as one option, and explains that a hint the browser can send at request time lets servers inline the right CSS to avoid that flash.

Pitfalls beyond the website

  • Emails sent from your site (receipts, booking confirmations) are rendered by each mail app, which may darken them in its own way. Test transactional emails in dark mode on the main mail apps; transparent logos are the usual casualty.
  • Screenshots in help articles look jarring in dark mode. Consider dark versions for key ones, or place them on a neutral frame.
  • Embedded widgets (booking calendars, maps, chat) may not follow your theme. Check whether each one offers a dark option.
  • Social share images don't change with theme; leave them as designed.

FAQ

Does dark mode help SEO?

No direct effect. It's a comfort and brand choice. Just make sure the dark theme doesn't hide content or break layout.

Will dark mode slow my site down?

Not noticeably if it's done with CSS variables. Avoid loading a second full stylesheet unless needed, and don't delay page rendering while you work out which theme to show.

Should the logo change in dark mode?

Usually its colors do, so it stays visible, while the shape and wordmark stay the same. Agree the dark version with whoever owns the brand guidelines.

Is a toggle necessary?

Not for most sites. Following the system setting covers most visitors; add a toggle if people spend long sessions on your site or ask for it.

When the brand needs to look right in both light and dark, we can design and build both themes so they stay in step.

Sources

WhatsAppLet’s talk