Liukuvärit

Dark gradient backgrounds: depth without the gloom

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.

GradientlyVahvistettu Gradiently-tili··5 min lukuaika
Kansi: Willow Plateau · GR·B328·0B

Tätä opasta ei ole vielä omalla kielelläsi, joten tässä se on englanniksi.

Lyhyesti

  • A rich dark gradient background starts from a tinted near-black rather than pure black, then adds one lit colour rising out of it.
  • Dark gradients look gloomy when they have no light source, no colour in the blacks and no contrast between the dark and lit areas.
  • Dark gradients band more than any other kind, so they almost always need a fine grain and careful export.
  • Light text on a dark gradient should sit in the darkest area and meet at least a 4.5:1 contrast ratio for body text.
  • Off-white type and slightly lifted blacks are easier on the eyes than pure white on pure black.
Tällä sivulla

A good dark gradient background is a tinted near-black with one colour glowing out of it, as if a single light were on in a dark room. The tint gives the blacks depth, the lit colour gives the eye somewhere to go, and the large dark area makes white type look sharp. Without those three things, a dark gradient just looks like a dim screen.

Start with a tinted near-black

Pure black #000000 is a dead end: there is nothing to blend from, and any colour next to it looks pasted on. A near-black with a hint of hue gives the gradient a family to belong to. Blue-blacks feel cool and technical, violet-blacks feel luxurious, green-blacks feel natural and warm browns feel like leather and wood. Choose the tint that matches the colour you plan to light.

Five near-blacks. Side by side the tints are obvious; on their own they read as black with a mood.

Add one lit colour

The lit colour is what turns darkness into atmosphere. Place it off-centre, usually near one edge or corner, so it reads as a light source. Keep it in the same family as the tint: violet light on violet-black, teal on blue-black. One colour is almost always enough. Two can work if they are neighbours. More than that starts to look like a nightclub, which is fine if you are designing for one; see neon gradients.

Six dark gradients, each a tinted near-black with one lit colour. Most of every swatch stays dark.

Why some dark gradients look gloomy

Gloomy

  • Pure black blending into dark grey
  • Light spread evenly, no source
  • The lit colour dulled towards grey
  • Visible stripes across the dark ramp
  • Grey text on a grey-black ground

Rich

  • A tinted near-black with a clear hue
  • One light, off-centre, fading out
  • The lit colour kept saturated at its brightest point
  • Fine grain over the whole surface
  • Off-white text in the darkest area

The most common mistake is mixing the lit colour towards grey on its way to black. Keep chroma up as it darkens: violet should become deeper violet, then violet-black, never grey. Blending in OKLCH helps; muddy gradients explains why.

Banding: the dark gradient's biggest risk

Dark gradients span only a small range of values, often a dozen or two per channel, and people are very sensitive to small steps between dark tones. So a smooth dark ramp across a full screen is the perfect recipe for visible stripes. Three habits prevent it: give the ramp enough range, add fine grain, and export without heavy compression. The detail is in gradient banding and grainy gradients.

Text on a dark gradient

Dark backgrounds are generous to type, but only in the dark areas. Keep words away from the lit colour, where contrast drops. Use off-white rather than pure white for long passages, because pure white on near-black can feel glaring. And measure: WCAG asks for at least 4.5:1 for body text and 3:1 for large text, which you can check with the WebAIM contrast checker.

Text colourOn `#0b0f1a`Use for
#ffffff whiteAbout 19:1Headlines and short labels
#e5e7eb off-whiteAbout 15:1, softerBody text and long reading
#9ca3af mid greyAbout 7.5:1, passes AACaptions and secondary text
#4b5563 dark greyAbout 2.5:1, failsAvoid for anything people must read
Text colours on a blue-black ground. Always check contrast at the lightest point behind the words, not the darkest.

The light runs straight behind the title and flattens it.

With the dark ground behind the title, the light frames it instead.

Where dark gradient backgrounds work best

Dark gradients suit anything that happens at night, feels premium or needs colour to glow: music and events, film and games, technology launches, fragrance and spirits, and portfolios where the work should be the brightest thing on the page. They also help product photography, because a lit object on a dark ground reads as precious.

  • Covers and posters: a dark ground makes a single bright title the hero
  • Stories and Reels: full-screen dark frames feel cinematic on a phone
  • Slides: light text on dark is calmer in a dim room than dark text on white
  • Website heroes: a dark hero makes the first screen feel deliberate; see website hero backgrounds

They suit less well where people read for a long time on paper, or where a brand is built on daylight, freshness or play. There, a pale ground with one soft colour does the same job.

A dark gradient background in CSS

css
.dark-hero {
  background-color: #0b0f1a; /* fallback */
  background-image:
    radial-gradient(circle at 85% 15%, #1d4ed8 0%, transparent 45%),
    linear-gradient(180deg, #0b0f1a 0%, #0f172a 100%);
  color: #e5e7eb;
}

.dark-hero h1 {
  color: #ffffff;
}
A blue-black ground with one blue light at the top right, off-white body text and white headlines. Add a grain layer to finish.

If you are designing a whole interface in dark mode rather than one background, see dark mode design. Many Marks in the Market are built on dark grounds, and they make room for your words automatically, moving their calmest area behind the text.

Usein kysyttyä

How do I make a dark gradient background look good?

Use a tinted near-black instead of pure black, add one off-centre lit colour from the same family, and finish with a fine grain.

Why does my dark gradient have stripes?

Dark blends span very few colour values, so the steps are wide and easy to see. Add grain, widen the range and export at high quality.

What text colour works on a dark gradient?

White for headlines and off-white such as #e5e7eb for body text, placed in the darkest area. Check at least 4.5:1 contrast for body text.

Should I use pure black in a gradient?

Rarely. A near-black with a slight hue blends more naturally and gives the gradient depth.

What colours go with a black gradient?

Deep violet, teal, blue, ember orange and rose all work as a single lit colour on a near-black ground in the same hue family.

Jaa tämä opas

Kirjoittanut GradientlyVahvistettu Gradiently-tili

Gradientlyn tiimi. Gradiently on Markien ympärille rakennettu suunnittelutyökalu: eläviä liukuvärejä, joiden ansiosta kaikki suunnittelemasi näyttää omaltasi.

Katso profiilimme