MarketExploreTry on
Pricing
Sign inStart
Field GuideBackgrounds
Backgrounds

Dark mode design: backgrounds, colour and contrast

Dark mode is not light mode inverted. Surfaces, text, accents and gradients all need their own values, and the rules are different from the ones you know.

GradientlyVerified Gradiently account·October 1, 2026·5 min read
Cover: Pass of Amber · GR·YTPP·1B

The short version

  • Good dark mode design uses dark grey rather than pure black for main surfaces, which softens contrast and leaves room to show depth.
  • In dark interfaces, elevation is shown by lightness: surfaces closer to the viewer are slightly lighter, because shadows barely show on dark backgrounds.
  • Text on dark backgrounds reads more comfortably in off-white than in pure white, with secondary text still above 4.5:1 contrast.
  • Saturated accent colours that work on white often look too heavy on dark, so dark themes use lighter, softer tints of the same hues.
  • Gradients glow on dark grounds but band easily there, so dark gradients benefit from a faint layer of grain.
On this page
Why to avoid pure black backgroundsShowing elevation with lightnessText colour and contrast in dark modeDesaturating accent coloursGradients in dark mode designBuilding dark mode in CSSA dark mode checklist

Dark mode design means building a separate set of values for surfaces, text, accents and imagery, not flipping light mode's colours. Dark grounds change how colour behaves: saturated hues look heavier, shadows disappear, bright white text glares, and smooth gradients band. The good news is that the same properties make dark themes beautiful when handled well: colour glows, depth feels layered, and the content sits calmly in front.

Why to avoid pure black backgrounds

Pure black, #000000, with pure white text gives the maximum possible contrast of 21:1. That sounds ideal but is often uncomfortable: many readers see bright text bloom or vibrate against pure black, especially in long passages. Black also leaves nowhere darker to go, so you cannot show one surface sitting below another. And on some OLED phones, content scrolling over true black can leave a brief smear as pixels switch on. Google's Material Design guidance uses #121212 as its base dark surface for these reasons.

A neutral dark scale. Each surface is a little lighter than the one below it. Text measures 15:1 and secondary text 7.1:1 on the Surface colour.

Showing elevation with lightness

In light mode, shadows separate a card from the page. On a dark background, a dark shadow barely shows. So dark themes flip the logic: the closer a surface is to the viewer, the lighter it is. The page is darkest, cards are a step lighter, menus and dialogs lighter again. Keep the steps small and consistent, and add a hairline border in a slightly lighter tone where two similar surfaces meet.

Page background

Colour

#0e0f12

Extra separation

None
Main surface

Colour

#121417

Extra separation

None
Cards#22262c

Extra separation

1px border rgb(255 255 255 / 0.06)
Menus and popovers

Colour

#2b3038

Extra separation

Border, plus a soft dark shadow
Dialogs#2b3038

Extra separation

A dimmed scrim over everything below
LayerColourExtra separation
Page background#0e0f12None
Main surface#121417None
Cards#22262c1px border rgb(255 255 255 / 0.06)
Menus and popovers#2b3038Border, plus a soft dark shadow
Dialogs#2b3038A dimmed scrim over everything below
Elevation by lightness. The values are a starting point; keep your own steps even.

Text colour and contrast in dark mode

Use an off-white such as #e6e8ec for body text instead of pure white. It still gives very high contrast, 15:1 on #121417, and it glares less. Secondary text can drop to a mid grey, but check it: #9aa1ad stays at 7.1:1 on the same surface and 5.5:1 on a lighter card. WCAG asks for at least 4.5:1 for normal text, whatever the theme; colour contrast explains how to check it.

Weight looks heavier on dark

Light text on a dark ground tends to look bolder than the same weight in dark on light. If body text feels heavy in dark mode, try a slightly lighter weight or a touch more letter spacing.

Desaturating accent colours

A strong violet like #7c3aed works as a button on white. On a dark surface it looks heavy and measures only 3.2:1, too low for text links. Its lighter tint #a78bfa measures 6.8:1 on the same background and reads as the same brand colour. The general rule: move accents lighter and slightly less saturated for dark themes, and keep the hue.

Light-mode accent on dark

  • Violet #7c3aed: 3.2:1 on #121417
  • Blue #2563eb: 3.6:1 on #121417
  • Heavy, vibrating edges on large areas
  • Fails as link text

Dark-mode tint of the same hue

  • Violet #a78bfa: 6.8:1 on #121417
  • Blue #93c5fd: 10.2:1 on #121417
  • Soft, luminous, clearly on brand
  • Passes as link text

Gradients in dark mode design

Dark grounds are where gradients shine. A deep background lets colour look like light rather than paint, which is why glows, auroras and neon blends are so often shown on near-black. Keep most of the surface dark and let colour appear in one or two places: a glow behind a hero, a gradient edge on a featured card, a soft wash at the top of a page.

Dark-mode gradients that glow and still end on the surface colour, so they sit inside the interface rather than on top of it.

The catch is banding. Dark, slow fades use only a few distinct shades on an 8-bit screen, so steps become visible. A faint grain layer hides them; see gradient banding and, for the web, CSS noise texture. For backgrounds built entirely in the dark, dark gradient backgrounds has palettes.

Building dark mode in CSS

Define colours once as custom properties and switch their values per theme. color-scheme tells the browser to render its own controls and scrollbars in the matching theme, and the light-dark() function picks between two values based on the active scheme.

css
:root {
  color-scheme: light dark;
  --surface: light-dark(#ffffff, #121417);
  --card: light-dark(#f6f7f9, #22262c);
  --text: light-dark(#16181d, #e6e8ec);
  --text-muted: light-dark(#5b6270, #9aa1ad);
  --accent: light-dark(#7c3aed, #a78bfa);
}

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

@media (prefers-color-scheme: dark) {
  img:not([src$=".svg"]) {
    filter: brightness(0.9);
  }
}
One set of tokens, two themes. Slightly dimming photos in dark mode stops them glaring against the darker page.

Give people a manual switch as well as following the system setting, and remember everything beyond the interface: charts, illustrations, logos and email all need checking in both themes. Gradients in email covers how mail apps handle dark mode.

A dark mode checklist

  • Dark grey surfaces, not pure black, with a clear lightness step per elevation.
  • Off-white body text at high contrast; secondary text still above 4.5:1.
  • Accents moved lighter and softer, keeping the brand hue.
  • Borders, not shadows, to separate similar surfaces.
  • Colour used as light in a few places, not everywhere.
  • Grain on large dark gradients to prevent banding.
  • Logos with a light version for dark grounds; see logo on a gradient background.
  • Both themes reviewed on a real phone, in a dim room and in daylight.

Questions people ask

Should dark mode use pure black?

Usually not for main surfaces. Dark grey, such as #121212 or similar, reduces glare, leaves room for lighter raised surfaces and avoids smearing on some OLED screens.

What text colour is best for dark mode?

An off-white such as #e6e8ec rather than pure white. It still gives very high contrast while glaring less.

How do you show depth in dark mode?

Make surfaces lighter as they get closer to the viewer, and use subtle borders between similar surfaces, because shadows barely show on dark backgrounds.

Why do my brand colours look wrong in dark mode?

Saturated colours chosen for white backgrounds look heavy on dark and may fail contrast. Use lighter, softer tints of the same hues.

Do gradients work in dark mode?

Very well: colour glows on dark grounds. Use them in a few places, end them on the surface colour, and add faint grain to stop banding.

Share this guide

Written by GradientlyVerified Gradiently account

The team behind Gradiently, a design tool built around Marks: living gradients that make everything you design look like yours.

See our profile

On this page

Why to avoid pure black backgroundsShowing elevation with lightnessText colour and contrast in dark modeDesaturating accent coloursGradients in dark mode designBuilding dark mode in CSSA dark mode checklist

Share this guide

Next in Backgrounds

Flyer design: layouts that get read in three seconds

Keep reading

All Backgrounds guides
Gradients

Dark gradient backgrounds: depth without the gloom

5 min read

Dark gradients can look like a premium night scene or like a muddy screen with the brightness turned down. The difference is a handful of decisions, all of them easy to copy.

Colour

Color contrast: readable text for everyone

5 min read

Contrast is the difference between words people read and words people skip. The WCAG numbers in plain English, how to check them, and what changes when the background is a gradient.

Gradients

Why your gradient has stripes, and how to fix banding

5 min read

You made a smooth gradient and it came back striped. That is banding, and it has a simple cause and a handful of reliable fixes. Here is the arithmetic, then the cures.

Find the look that’s only yours.

Every Mark is a living background with one owner. Try an unclaimed Mark, and claim yours when it feels right.

Start designingSee the launch offer

Marks left to claim

50of 1,000

950 claimed so farFind yours

Check a certificate

Type a certificate number or a Mark’s code to see who owns it.

Works with ChatGPT and Claude

Ask your AI for a design. It makes it in your Mark, ready to edit.

ChatGPTClaude
How to connect

Product

  • Market
  • Explore
  • Pricing
  • Launch packs
  • Certificates

Learn

  • Field Guide
  • Help centre
  • What’s new

Developers

  • Overview
  • ChatGPT and Claude
  • API reference
  • API keys

Company

  • About
  • Contact us
  • Sign in

Legal

  • Terms
  • Privacy
  • Refunds
  • Mark protection
  • Cookies
  • All policies
Move through the letters. Each one wears a real Mark.Touch a letter to see its Mark.One name. Ten Marks inside it.
© 2026 Gradiently