Should your website have dark mode?

Ask for dark mode when visitors spend long sessions on your site or already use a dark theme in your product, and skip it when the budget covers only one theme done properly. If you want it, put it in the brief before design starts, because it adds a second set of colours to design, build and test.

web.dev calls dark mode an aesthetic choice for most users, and notes that some people, for example users with low vision, use it as an accessibility tool (web.dev: prefers-color-scheme).

What does dark mode on a website actually mean?

There are two ways to offer it, and they combine well:

  • Follow the system setting. The prefers-color-scheme media feature detects whether a visitor has asked for a light or dark theme, a preference set in their operating system or browser (MDN: prefers-color-scheme). The site simply matches the device.
  • Offer a toggle. A switch on the page lets visitors choose light or dark and remembers the choice.
  • Both. web.dev describes starting from the browser's prefers-color-scheme signal and then letting visitors override their system setting (web.dev). This is the setup I usually suggest.

When is dark mode worth asking for?

In my experience it earns its place when:

  • Visitors stay a long time. Documentation, long articles and member areas are read for long stretches, often in the evening.
  • Your product already has it. A marketing site that matches a dark app feels like the same product.
  • The colour system is being built anyway. On a new site built on colour variables, a dark set added early is contained work.

It is usually not worth it when:

  • The site is small and the budget is fixed. One theme designed and tested well beats two themes tested halfway.
  • Exact colour is the selling point. Product photos for food, fashion or interiors were shot for one background.
  • Much of the page comes from other companies. Booking, payment and map widgets that stay light make a dark page look patchy.
  • Nobody will maintain it. Every new banner, image or embed then needs checking in both themes.

If you decide against it, say so in the brief too. MDN notes that color-scheme: only light can turn off colour overrides caused by Chrome's Auto Dark Theme (MDN: color-scheme), so ask whether the site should declare itself light only.

What does dark mode add to the design?

A second set of colours, plus decisions on logos and images:

  • Colours named by their job. Text, background, border and accent each get a light and a dark value. web.dev advises role names such as accent colour rather than highlight yellow, because the yellow may not be yellow in dark mode (web.dev).
  • Softer white. web.dev avoids pure white on dark backgrounds to prevent glowing and bleeding, and uses a slightly darker white instead (web.dev).
  • Logos. Dark lettering disappears on a dark background, so you need a light version from whoever holds the brand files.
  • Photos and illustrations. web.dev leaves it to the designer's judgement which image suits each mode, and shows the picture element serving a different image for dark mode (web.dev).

If the design is not made yet, put dark mode into the Figma website design scope from the start, and check both modes in the file as part of reviewing a design before it goes to build.

What does dark mode add to the build?

  • Colour variables everywhere. web.dev's example keeps light and dark values in two sets of CSS variables used by the rest of the styles (web.dev). Colours typed into single elements make dark mode slow to add later.
  • Browser controls. With the color-scheme property, browsers adapt the default colours of the page background, scrollbars, form controls and their own interface, such as spellcheck underlines. MDN also recommends a color-scheme meta tag in the head to help prevent unwanted screen flashes during page load (MDN: color-scheme).
  • Your own styles. web.dev says that in the general case color-scheme should be combined with prefers-color-scheme (web.dev: color-scheme), so your buttons, fields and error messages still need dark values.
  • Embeds. MDN explains that an embedded iframe can style itself from the colour scheme of the page around it (MDN: prefers-color-scheme), but those styles live inside the embedded page, so a booking widget only follows your theme if its provider built that in.
  • The toggle. A labelled button that works by keyboard and remembers the choice after a reload.

How do Figma, Webflow and WordPress handle it?

All three can hold two sets of colours; how visitors switch is the part to ask about.

  • Figma. Figma's own example of variable modes is a light mode as the default and a dark mode, applied to one set of designs you can switch between (Figma: modes for variables). Modes, and how many per collection, depend on your Figma plan, so check the current plan. In Dev Mode, a developer can change modes to see each value (Figma: variables in Dev Mode), which keeps a Figma to website build exact.
  • Webflow. Variable modes adjust values by design context, such as light and dark themes (Webflow: design systems), and a theme mode is applied to an element such as the Body from the Style panel (Webflow: variables). The help page does not describe switching modes from the visitor's setting or a toggle, so ask how your Webflow build will handle that part.
  • WordPress. WordPress turns the colour presets in a theme's theme.json into CSS custom properties automatically (WordPress: colour settings). Style variations are alternative versions of theme.json that users pick for their site, saved as a user customisation (WordPress: style variations). That changes the whole site, not each visitor's view, so ask how a WordPress build will follow each visitor's preference.

Does colour contrast have to pass in both themes?

Yes, because each theme is what some visitors see. WCAG 2.2 success criterion 1.4.3, level AA, asks for a contrast ratio of at least 4.5:1 for text and 3:1 for large-scale text, and says text that is part of a logo or brand name has no contrast requirement (W3C: contrast minimum). Criterion 1.4.11 asks for at least 3:1 against adjacent colours for what identifies controls and their states, and for graphics needed to understand the content (W3C: non-text contrast).

Three details catch dark themes out:

  • Brand colours. A colour that passes on white can fail on black. web.dev's example is the classic link blue, which fails WCAG AA on a black background (web.dev: color-scheme). Dark themes often need a lighter tint for text and links.
  • No rounding. W3C treats the ratios as thresholds and says computed values should not be rounded, so 4.499:1 does not meet 4.5:1 (W3C: contrast minimum).
  • Pairs. W3C counts it as a failure when a text colour is specified without a background colour, or the reverse, because the visitor's default is unknown (W3C). Set them in pairs in both themes.

The wider checks are in my article on accessibility in a website build; dark mode means running the contrast checks twice.

What should go in the brief and the scope?

  1. Pages: the whole site or named sections. Draw the line between sections, not inside one journey such as checkout.
  2. Switching: system setting, toggle or both, and where the toggle sits.
  3. First view: which theme shows before anyone chooses. MDN notes that the light value also covers visitors who have not expressed a preference (MDN: prefers-color-scheme).
  4. Brand files: who supplies the logo for dark backgrounds and any second images, and by when.
  5. Embeds: each third-party widget, and whether it may stay light.
  6. Contrast: WCAG 2.2 level AA in both themes.
  7. Review: both themes checked on the staging site before the final milestone.

If you are hiring on Upwork, name dark mode and the switching option in the job post, so every quote covers it.

How do you review both themes on the staging site?

Switch your device between light and dark and go through every template in each, or use Chrome DevTools: web.dev describes opening the Command Menu, running Show Rendering and changing the Emulate CSS media feature prefers-color-scheme option (web.dev). Then check:

  • Logos and images: nothing disappears into the background.
  • Forms: fields, errors and success messages are readable.
  • Embeds: each looks the way the scope agreed.
  • The toggle: the choice survives a reload and a move to another page.
  • Phones: repeat the quick checks at your agreed widths, as in my guide to what responsive should mean in a contract.

web.dev's guide says careful testing is required (web.dev), and in my experience the bugs sit where nobody looked in the design: an error message, an empty search result, the 404 page.