Phones, laptops and many apps now offer a dark appearance, and plenty of people keep it switched on all day. When they visit a website that stays bright white, the contrast can be jarring, especially at night. Some sites respond by offering a dark version; others don’t, and that is often fine.
Dark mode is not a requirement for a good business website. Done carelessly, it creates more problems than it solves: unreadable text, invisible logos and images that look wrong. This guide explains when dark mode is worth supporting, how it works, and the design rules that make it look intentional.
The short answer
- Dark mode is optional. A well-designed light site with good contrast serves most business audiences perfectly well.
- Support it when your visitors spend long periods on the site, read at night, or expect it, such as users of software, tools or documentation.
- Follow the system setting with the CSS
prefers-color-schememedia query, and optionally offer a manual switch. - Design it properly: adjust colours, check contrast, and handle logos, images and shadows. Don’t simply invert the light design.
How dark mode works on the web
Browsers tell websites whether the visitor’s device is set to light or dark appearance. A site can respond with CSS:
:root {
--bg: #ffffff;
--text: #1a1a2e;
}
@media (prefers-color-scheme: dark) {
:root {
--bg: #14121f;
--text: #ece9f5;
}
}
The page then uses those colour variables everywhere. MDN’s reference on prefers-color-scheme explains the details. Using design tokens like these from the start makes dark mode much easier to add later.
Some sites also offer a toggle so visitors can override their system setting. If you add one, remember the choice, and make sure the page doesn’t flash light before switching to dark.
When dark mode is worth supporting
| Situation | Dark mode value |
|---|---|
| Marketing site for a service business | Low to moderate; good light design matters more |
| Long-form articles and guides | Moderate; some readers prefer it, especially at night |
| Software, tools, dashboards and documentation | High; users often expect it |
| Portfolio or creative brands | Depends on the brand; dark designs can suit some |
| Sites with lots of photography | Moderate; images can look striking on dark backgrounds |
If your brand is built around a bright, light look, a dark mode needs particular care to still feel like the same brand.
Design rules for a good dark mode
Don’t use pure black and pure white
Pure black backgrounds with pure white text can cause glare and make text appear to vibrate for some readers. Use very dark greys or tinted darks for backgrounds, and slightly softened whites for text.
Rethink brand colours
Saturated colours that work on white can feel harsh on dark backgrounds. Many brands use a lighter, slightly less saturated version of their main colour in dark mode. Check that buttons and links still stand out.
Check contrast again
Contrast requirements apply in both modes. WCAG asks for a contrast ratio of at least 4.5:1 for normal text. A palette that passes in light mode doesn’t automatically pass in dark. Our guide to colour contrast and accessible typography explains how to check.
Use elevation, not shadows
Shadows barely show on dark backgrounds. Instead, show depth by making raised surfaces, such as cards and menus, slightly lighter than the background.
Handle logos and icons
A dark logo disappears on a dark background. Prepare a light or reversed version, and make sure SVG icons use colours that adapt.
Adjust images carefully
Most photographs work in both modes, but some images do not:
- illustrations and diagrams with white backgrounds look like bright boxes;
- screenshots of light interfaces can be dazzling;
- transparent PNGs with dark details can vanish.
Provide alternative versions for key graphics, or add subtle backgrounds behind them. The HTML <picture> element can serve a different image when dark mode is active.
Don’t forget forms and embeds
Form fields, focus outlines, error messages, maps, video players and third-party widgets often ignore your dark styles. Test every one.
Should you add a manual switch?
Following the system setting is enough for most sites, because visitors have already told their device what they prefer. A manual switch helps when people often read in different conditions, or when your dark and light designs feel quite different and some visitors may prefer one regardless of their device.
If you add a switch:
- place it where people expect it, usually in the header or the footer;
- give it a clear label, not just a sun or moon icon;
- remember the choice for the next visit;
- keep a way to return to the system setting.
Common mistakes
- Inverting colours automatically, which turns photos into negatives and breaks brand colours.
- Forgetting the logo, so it disappears against a dark header.
- Mixing modes, such as a dark page with a bright white form or map in the middle.
- Testing only the homepage, while articles and forms stay broken.
Performance and maintenance
A well-implemented dark mode adds very little to page weight, because it mostly changes colour variables. The bigger cost is ongoing: every new component, image and page has to work in both modes. Decide whether you can maintain that before committing. Our guide to website design systems explains how shared tokens make this manageable.
How to test dark mode
- Switch your phone and computer to dark appearance and browse the whole site.
- Check every page type, not only the homepage: articles, forms, pricing tables, error pages.
- Run contrast checks on text, buttons and links in dark mode.
- Test with images, logos and embedded content.
- Check the switch between modes doesn’t cause a flash or a layout shift.
- Review in each language version, since text length and fonts may differ.
Frequently asked questions
Does dark mode save battery?
On phones with OLED screens, darker pixels use less power, so dark interfaces can save some battery. On other screens, the difference is small. It isn’t a strong reason on its own for a business website to offer dark mode.
Is dark mode better for accessibility?
It helps some people, such as those sensitive to bright light, and makes reading harder for others, including some people with astigmatism. The most accessible approach is to respect each visitor’s system setting and ensure good contrast in both modes.
Does dark mode affect SEO?
No. Search engines read your content the same way regardless of colour scheme. Good contrast and readable text help visitors in either mode.
What to do next
Switch your phone to dark mode and visit your own website. If it still looks fine in light colours, you may not need a dark mode at all. If parts look broken, such as invisible logos or unreadable embedded content, fix those first.
When we design a site through our website design and development service, we can plan colours as a consistent set from the start, which makes a future dark mode much easier if you want one. For broader trends, see our guide to web design trends.