{"course":{"slug":"design-foundations","title":"Design, before Any Software","url":"https://addaly.com/learn/design-foundations","level":"beginner","track":"create"},"lesson":{"slug":"dark-mode-is-not-inversion","title":"Dark mode, built rather than inverted","url":"https://addaly.com/learn/design-foundations/dark-mode-is-not-inversion","position":43,"of":74,"minutes":9,"answer":"A dark theme is a second design with its own colour values: a near-black surface rather than black, elevation expressed by lightness rather than shadow, lightened and desaturated brand colours.","keyIdea":"A dark theme is a second design with its own colour values: a near-black surface rather than black, elevation expressed by lightness rather than shadow, lightened and desaturated brand colours, and a slightly lighter font weight to offset halation."},"body":{"format":"markdown","text":"## Inverting does not work\n\nThe cheap approach is a filter that flips every lightness value. It produces a theme where the brand colour is wrong, the photographs are negatives, the shadows are inverted into glows, and the text is pure white on pure black, which is the one combination you specifically do not want.\n\nA dark theme is a second design with its own decisions. There are five of them and they are all small.\n\n## 1. Not pure black, and not pure white\n\nWhite text on `#000000` produces the strongest halation, the smearing effect from the contrast lesson where bright glyphs appear to bleed into the dark field. It is worse for readers with astigmatism and worse on OLED screens, where the pixels around a lit glyph are switched off and the transition is absolute.\n\nThe widely used baseline is a very dark grey rather than black (Material Design specifies `#121212` for the base surface) with text below full white. A common approach is white at around 87% opacity for primary text, 60% for secondary, which lands near `#DEDEDE` and `#999999` on that surface.\n\nThose particular numbers are one team's answer rather than a law. The principle behind them is not: back off both extremes.\n\n## 2. Elevation runs the other way\n\nIn a light theme, a raised surface casts a shadow and gets darker at its edges. In a dark theme a shadow is invisible, because there is nothing darker for it to be.\n\nSo elevation is expressed by lightness instead: the higher a surface sits, the lighter it is. A dialogue floats above a card, which floats above the page, and each step is a few points lighter. This is why dark themes need more neutral steps at the dark end than light themes need at the light end, and why the compression discussed in the neutrals lesson bites hardest here.\n\n## 3. Saturated colours have to change\n\nA brand blue that works on white is often close to unreadable on a dark surface, and a fully saturated colour on a dark ground appears to vibrate: an effect strong enough that two adjacent saturated colours on black can be uncomfortable to look at.\n\nThe adjustment is to **lighten and desaturate** for dark mode. A brand at `oklch(0.50 0.20 255)` on white might become `oklch(0.72 0.13 255)` on a dark surface: lighter so the contrast works, less chromatic so it stops buzzing.\n\nThis means a real dark theme has its own colour values, not a filter applied to the light ones. CSS makes maintaining two sets straightforward:\n\n```css\n:root { color-scheme: light dark; }\n.button {\n  background: light-dark(oklch(0.50 0.20 255), oklch(0.72 0.13 255));\n}\n```\n\n## 4. Text looks heavier on dark\n\nBecause of halation, the same font at the same weight appears bolder on a dark background. A page set in a 400 weight on white can look like 500 on dark.\n\nThe correction is to drop a weight step, or where a variable font is available, to shave the weight axis slightly:\n\n```css\n@media (prefers-color-scheme: dark) {\n  body { font-weight: 350; }\n}\n```\n\nThis is a small change that removes a widespread and rarely-diagnosed sense that the dark version looks clumsier than the light one.\n\n## 5. Images and shadows need handling\n\nPhotographs on a dark surface often look too bright, and a common treatment is a slight brightness reduction. Logos and illustrations supplied as dark artwork on transparency vanish entirely, so they need a light variant. Shadows should be replaced by surface lightness, as above, or used only at very low opacity for a subtle edge.\n\n## Is dark mode better?\n\nThis is less settled than the enthusiasm suggests, and it is worth being accurate.\n\nFor people with ordinary vision in ordinary lighting, most reading studies find **dark text on a light background is read at least as well as, and often better than, the reverse**: the same halation effect is the usual explanation. The claimed benefits for eye strain and for sleep are weaker than commonly stated; screen brightness and ambient light matter more than polarity.\n\nWhat is well supported is that dark themes are clearly better for some people: those with light sensitivity, some migraine sufferers, some people with certain visual conditions, and anybody reading in a dark room. Battery saving on OLED is real and modest.\n\nSo the defensible position is: offer both, respect the system setting by default with `prefers-color-scheme`, and build the dark theme properly rather than treating it as a filter over the real one. Neither theme is the correct one. Both are, for different readers."},"check":{"question":"A team ships dark mode by applying a CSS filter that inverts lightness across the whole page. Beyond the photographs appearing as negatives, what is the most significant structural problem?","options":[{"text":"Inverted lightness puts text at pure white on pure black, which maximises halation and is the one combination to avoid.","correct":false,"tempting":"Names a real consequence of the approach, and the surface treatment is repairable by choosing different endpoints."},{"text":"Brand colours are inverted to their opposites on the hue wheel, so the product's identity colour becomes a different hue entirely.","correct":false,"tempting":"A lightness inversion changes lightness rather than hue, so the brand colour shifts in brightness but does not become its opposite."},{"text":"Elevation inverts, so raised surfaces become darker than the page and the depth ordering of the interface reverses.","correct":true},{"text":"The inversion applies to the whole document, so any element that was already dark, such as a code block, becomes light and breaks the theme's consistency.","correct":false,"tempting":"Identifies a genuine irritation of blanket inversion that affects isolated components rather than the depth model of the whole interface."}]},"prev":{"slug":"semantic-colour-and-culture","title":"Red means danger, except where it does not","url":"https://addaly.com/learn/design-foundations/semantic-colour-and-culture"},"next":{"slug":"colour-for-print","title":"Why your blue printed purple","url":"https://addaly.com/learn/design-foundations/colour-for-print"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Source and assessment review continues. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'Dark mode, built rather than inverted', in Design, before Any Software. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/design-foundations/dark-mode-is-not-inversion (Accessed: 29 November 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"Dark mode, built rather than inverted","courseTitle":"Design, before Any Software","module":{"index":4,"slug":"colour-measured","title":"Colour, measured"},"answer":null,"keyIdea":"A dark theme is a second design with its own colour values: a near-black surface rather than black, elevation expressed by lightness rather than shadow, lightened and desaturated brand colours, and a slightly lighter font weight to offset halation.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"inverting-does-not-work","runs":[{"text":"Inverting does not work"}]},{"t":"p","runs":[{"text":"The cheap approach is a filter that flips every lightness value. It produces a theme where the brand colour is wrong, the photographs are negatives, the shadows are inverted into glows, and the text is pure white on pure black, which is the one combination you specifically do not want."}]},{"t":"p","runs":[{"text":"A dark theme is a second design with its own decisions. There are five of them and they are all small."}]},{"t":"h2","id":"1-not-pure-black-and-not-pure-white","runs":[{"text":"1. Not pure black, and not pure white"}]},{"t":"p","runs":[{"text":"White text on "},{"text":"#000000","code":true},{"text":" produces the strongest halation, the smearing effect from the contrast lesson where bright glyphs appear to bleed into the dark field. It is worse for readers with astigmatism and worse on OLED screens, where the pixels around a lit glyph are switched off and the transition is absolute."}]},{"t":"p","runs":[{"text":"The widely used baseline is a very dark grey rather than black (Material Design specifies "},{"text":"#121212","code":true},{"text":" for the base surface) with text below full white. A common approach is white at around 87% opacity for primary text, 60% for secondary, which lands near "},{"text":"#DEDEDE","code":true},{"text":" and "},{"text":"#999999","code":true},{"text":" on that surface."}]},{"t":"p","runs":[{"text":"Those particular numbers are one team’s answer rather than a law. The principle behind them is not: back off both extremes."}]},{"t":"h2","id":"2-elevation-runs-the-other-way","runs":[{"text":"2. Elevation runs the other way"}]},{"t":"p","runs":[{"text":"In a light theme, a raised surface casts a shadow and gets darker at its edges. In a dark theme a shadow is invisible, because there is nothing darker for it to be."}]},{"t":"p","runs":[{"text":"So elevation is expressed by lightness instead: the higher a surface sits, the lighter it is. A dialogue floats above a card, which floats above the page, and each step is a few points lighter. This is why dark themes need more neutral steps at the dark end than light themes need at the light end, and why the compression discussed in the neutrals lesson bites hardest here."}]},{"t":"h2","id":"3-saturated-colours-have-to-change","runs":[{"text":"3. Saturated colours have to change"}]},{"t":"p","runs":[{"text":"A brand blue that works on white is often close to unreadable on a dark surface, and a fully saturated colour on a dark ground appears to vibrate: an effect strong enough that two adjacent saturated colours on black can be uncomfortable to look at."}]},{"t":"p","runs":[{"text":"The adjustment is to "},{"text":"lighten and desaturate","b":true},{"text":" for dark mode. A brand at "},{"text":"oklch(0.50 0.20 255)","code":true},{"text":" on white might become "},{"text":"oklch(0.72 0.13 255)","code":true},{"text":" on a dark surface: lighter so the contrast works, less chromatic so it stops buzzing."}]},{"t":"p","runs":[{"text":"This means a real dark theme has its own colour values, not a filter applied to the light ones. CSS makes maintaining two sets straightforward:"}]},{"t":"code","lang":"css","label":"CSS","text":":root { color-scheme: light dark; }\n.button {\n  background: light-dark(oklch(0.50 0.20 255), oklch(0.72 0.13 255));\n}"},{"t":"h2","id":"4-text-looks-heavier-on-dark","runs":[{"text":"4. Text looks heavier on dark"}]},{"t":"p","runs":[{"text":"Because of halation, the same font at the same weight appears bolder on a dark background. A page set in a 400 weight on white can look like 500 on dark."}]},{"t":"p","runs":[{"text":"The correction is to drop a weight step, or where a variable font is available, to shave the weight axis slightly:"}]},{"t":"code","lang":"css","label":"CSS","text":"@media (prefers-color-scheme: dark) {\n  body { font-weight: 350; }\n}"},{"t":"p","runs":[{"text":"This is a small change that removes a widespread and rarely-diagnosed sense that the dark version looks clumsier than the light one."}]},{"t":"h2","id":"5-images-and-shadows-need-handling","runs":[{"text":"5. Images and shadows need handling"}]},{"t":"p","runs":[{"text":"Photographs on a dark surface often look too bright, and a common treatment is a slight brightness reduction. Logos and illustrations supplied as dark artwork on transparency vanish entirely, so they need a light variant. Shadows should be replaced by surface lightness, as above, or used only at very low opacity for a subtle edge."}]},{"t":"h2","id":"is-dark-mode-better","runs":[{"text":"Is dark mode better?"}]},{"t":"p","runs":[{"text":"This is less settled than the enthusiasm suggests, and it is worth being accurate."}]},{"t":"p","runs":[{"text":"For people with ordinary vision in ordinary lighting, most reading studies find "},{"text":"dark text on a light background is read at least as well as, and often better than, the reverse","b":true},{"text":": the same halation effect is the usual explanation. The claimed benefits for eye strain and for sleep are weaker than commonly stated; screen brightness and ambient light matter more than polarity."}]},{"t":"p","runs":[{"text":"What is well supported is that dark themes are clearly better for some people: those with light sensitivity, some migraine sufferers, some people with certain visual conditions, and anybody reading in a dark room. Battery saving on OLED is real and modest."}]},{"t":"p","runs":[{"text":"So the defensible position is: offer both, respect the system setting by default with "},{"text":"prefers-color-scheme","code":true},{"text":", and build the dark theme properly rather than treating it as a filter over the real one. Neither theme is the correct one. Both are, for different readers."}]}],"check":{"question":[{"text":"A team ships dark mode by applying a CSS filter that inverts lightness across the whole page. Beyond the photographs appearing as negatives, what is the most significant structural problem?"}],"options":[{"text":[{"text":"Inverted lightness puts text at pure white on pure black, which maximises halation and is the one combination to avoid."}],"correct":false,"tempting":[{"text":"Names a real consequence of the approach, and the surface treatment is repairable by choosing different endpoints."}]},{"text":[{"text":"Brand colours are inverted to their opposites on the hue wheel, so the product’s identity colour becomes a different hue entirely."}],"correct":false,"tempting":[{"text":"A lightness inversion changes lightness rather than hue, so the brand colour shifts in brightness but does not become its opposite."}]},{"text":[{"text":"Elevation inverts, so raised surfaces become darker than the page and the depth ordering of the interface reverses."}],"correct":true,"tempting":null},{"text":[{"text":"The inversion applies to the whole document, so any element that was already dark, such as a code block, becomes light and breaks the theme’s consistency."}],"correct":false,"tempting":[{"text":"Identifies a genuine irritation of blanket inversion that affects isolated components rather than the depth model of the whole interface."}]}],"order":[1,0,3,2],"why":null},"prev":{"slug":"semantic-colour-and-culture","title":"Red means danger, except where it does not","minutes":8},"next":{"slug":"colour-for-print","title":"Why your blue printed purple","minutes":9}}}