Skip to content
IndexRequest a UIAboutContact

Light vs Dark Mode Compare

The same card in light and dark, split by a draggable wipe, with a naive-invert version to show what goes wrong.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI IMAGE OR VIDEO TOOL
Clean side-by-side UI comparison of the same profile card in light and dark modes split by a vertical divider, the left half a white card with a landscape photo, dark text, blue button, the right half a designed dark theme with charcoal background, off-white text, slightly lighter blue button and the unchanged photo, a small label under each half Light and Dark designed; flat modern style. Negative: pure black, inverted photo, heavy glow, text errors. Reduced motion: static design.

About this pattern

Definition

A good dark theme is designed, not inverted. Simply inverting colours turns photos into negatives, makes shadows glow, and leaves pure white or pure black that is harsh to read. A designed theme lowers surfaces to dark greys, softens text to off-white and lifts accent colours a little.

When to use it

  • Use dark grey surfaces, not pure black; raise elevated surfaces slightly lighter.
  • Use off-white text with enough contrast and desaturate large coloured areas.
  • Keep images as they are; do not invert them.
  • Shadows become less visible, so use lighter surface steps to show depth.

What the controls do

  • Two build buttons and a wipe slider to move the split.

Motion & timing

  • The split follows the slider.
  • Reduced motion: no animation is involved.

Tips & variations

  • Test both themes against the contrast ratios, especially for secondary text.
  • Respect the system setting with prefers-color-scheme and allow an override.

Code of this live preview

HTML
<div class="bx"><div class="pre" id="pre" role="group" aria-label="Dark build"><button data-p="0" aria-pressed="true">Designed dark</button><button data-p="1" aria-pressed="false">Naive invert</button></div><div class="cp" id="cp"><div class="pn lt"><div class="cd"><i class="ph"></i><b>Mountain trip</b><span>3 days · 12 photos</span><u>Open</u></div></div><div class="pn dk" id="dk"><div class="cd"><i class="ph"></i><b>Mountain trip</b><span>3 days · 12 photos</span><u>Open</u></div></div><i class="dv" id="dv"></i></div><label class="rw">Wipe <b id="wv">50%</b><input id="ws" type="range" min="0" max="100" value="50"></label><p class="out" id="out"></p></div>

Related patterns

Dark Mode Token Pairs

↗
Dark Mode Token PairsPalettes by Concept

Sun-Moon Theme Toggle

↗
Sun-Moon Theme ToggleMicro Interactions

Contrast Ratio Checker

↗
Contrast Ratio CheckerColour Techniques