Free guideThe newsletter. Real UI fixes by email, and a free 35-page guide to AI design skills.
Ship Better UI

, 1 minute 29 seconds

Only 10% of sites have dark mode

The rule

Declare color-scheme: light dark in one line, then design the dark theme yourself: a near-black #10131B base, surfaces that lighten as they rise, off-white text at 16.9:1 and a softer accent.

Try it

Apply the fix

Prompt for your AI coding tool

Paste it into Claude Code, Cursor or any AI coding tool, then share the page you want fixed.

Build a dark theme on purpose for the interface I share, so that no browser has to darken it by guessing. If it already has a dark theme, check it against these four steps and fix what fails.

1. Declare it: add one line of CSS, color-scheme: light dark. The browser then changes nothing and the dark colours are yours to set.
2. Base: start near-black, not pure black. Use #10131B, never #000. Pure black leaves nowhere darker to go, so shadows and depth disappear.
3. Surfaces: each layer up gets lighter. Base #10131B, then card #181D28, then panel #252E40. Every card must be lighter than the page it sits on.
4. Text and accent: soften the extremes. Use off-white #F2F4FA at 16.9:1 in place of #FFF on #000 at 21:1, and trade a loud accent for a lighter, softer one (#EA580C becomes #FF9874).

Keep the light theme, the content, the features and the layout. When you are done, list the colour of each layer, the contrast ratio of the text, and what you changed under each of the four headings.

More prompts like this in the free guide 

The problem

By the video's count, only 10% of sites have dark mode, yet 40% of page loads happen in dark mode. So Safari 27.3 (beta) can now darken a light site by itself. It flips the brightness, and the result is a guess: pure black, glaring white text and cards that sink below the page.

The fix

Build your dark theme before the browser guesses it.

  1. Declare it. One line of CSS, color-scheme: light dark, and Safari changes nothing. The dark mode is yours to build.
  2. Start near-black. Use #10131B for the base, never #000.
  3. Lighten as you rise. Each layer up gets lighter: base #10131B, card #181D28, panel #252E40.
  4. Soften the extremes. Set text in off-white #F2F4FA at 16.9:1, and trade the loud accent for a lighter, softer one: #FF9874 in place of #EA580C.

Why it works

Pure black leaves nowhere darker to go, so shadows and depth disappear. Flipping the brightness sank the card below the page. Stepping each layer up puts it back on top: base, card, then panel. White on black is 21:1, and it glares. Off-white at 16.9:1 still passes easily.

How to apply it

Add the color-scheme line first. Then name your layers (base, card, panel) and give each one a colour, lightest on top. Check that every card is lighter than the page beneath it. Swap pure white text for an off-white and check its contrast. Last, look at your accent on the dark base: if it is loud, trade it for a lighter, softer one.

Free guide · 35 pages

Get fixes like this by email

Join the newsletter and get the 35-page guide to AI design skills: the skills, the order to use them in, and prompts to copy.

Watch it on

More on colour

All 5 lessons on colour