Dark Mode Typography: Readable Type on Dark Backgrounds
Why the same font can look different in dark mode, and how to make it readable.
Dark mode is now the default for many people. Phones, laptops and whole websites switch to a dark theme on their own, and many sites offer one by choice. That makes dark-mode typography a practical concern, not a styling extra. A layout that reads well on white can become tiring on black when the colours are simply inverted, so the type needs its own decisions.
This guide explains why the same font can look different on a dark background, how to choose colours and weights that stay readable, and how to test your text before you publish. The examples use real contrast ratios, so you can check your own colours.
Why the same font can look different in dark mode
On a light page, dark text sits on a bright surface, and the edges of the letters look crisp. Reverse that and the effect changes. Many designers describe a glow or bleed around bright strokes on a dark background, which is often called halation. The effect is strongest with thin strokes and small sizes, so a font that looks sharp on white can look soft or fuzzy on black.
A second effect is perceived weight. Light text on a dark background often looks thinner than the same weight set in dark text on a light background. A light weight that feels comfortable on white can become hard to read on black, even though the font file has not changed.
Choose your colours before you choose the font
Colours set the limits for everything else, so decide them first. Pure white on pure black gives the highest possible contrast, 21:1, but it is often the hardest on the eyes during a long reading session. Most dark interfaces work better with a softer pairing. These four examples show the measured contrast ratios:
- #E5E7EB on #111827 (light grey on deep navy): 14.33:1. Comfortable for body text.
- #9CA3AF on #111827 (mid grey on deep navy): 6.99:1. Suitable for captions and secondary text.
- #6B7280 on #111827 (dark grey on deep navy): 3.67:1. Passes only for large text, and fails the 4.5:1 requirement for normal body text.
- #FFFFFF on #000000 (pure white on pure black): 21:1. Maximum contrast, but harsh for long reading.
The WCAG guidelines set the minimum levels: 4.5:1 for normal text, and 3:1 for large text (18pt or 24px regular, or 14pt bold). Aim for 4.5:1 on all body text, so the page works for people with low vision and not only for people with good screens.
Pick a font that holds up on dark backgrounds
Some fonts have thin strokes, tight counters (the enclosed spaces inside letters such as a, e and o) or a small x-height. On a dark background these details fill in or blur first. Look for a typeface with open counters, clear letter shapes and a sturdy regular weight. Test the font at your smallest body size, usually 16px, because problems show up there first.
If you use a variable font, you can fine-tune the weight. A value between the standard steps, such as 450 instead of 400, can give light text a little more body without making headings look heavy. The variable fonts guide explains how to set this up.
Set weight, size and spacing for dark surfaces
These are the settings to adjust first:
- Weight: use regular or medium for body text. Reserve light weights for large headings.
- Size: keep body text at 16px or larger, and avoid long passages in small captions.
- Line height: use 1.5 to 1.7 for body text. Light text needs more space between lines so the eye can follow it.
- Letter spacing: a small amount of extra spacing, around 0.01em, can help small text. Keep headings at their normal spacing.
A CSS starting point
This example uses one dark surface and an off-white text colour. It also tells the browser the page is dark, so form controls and scrollbars match the theme.
:root {
color-scheme: dark;
--surface: #111827;
--text: #E5E7EB;
--text-muted: #9CA3AF;
}
body {
background: var(--surface);
color: var(--text);
font-family: "Your Body Font", system-ui, sans-serif;
font-weight: 400;
font-size: 1.0625rem;
line-height: 1.65;
}
h1, h2, h3 {
font-weight: 700;
color: #FFFFFF;
}
small, .caption {
color: var(--text-muted);
letter-spacing: 0.01em;
}
Do not forget placeholders, links and focus states
Dark-mode problems often hide in the details. Check these elements separately:
- Placeholder text in form fields. Grey placeholders on a dark field can fall below 4.5:1. Make them clearly readable, and never rely on a placeholder for instructions.
- Links. Use an underline or another visible cue, not only a colour change, and pick a link colour that stands out from the body text.
- Focus rings. Keyboard users need a visible outline. A thin dark outline disappears on a dark background, so use a bright ring with a small offset.
- Disabled buttons and helper text. These are often set to very low contrast on purpose, and they can fail accessibility checks without anyone noticing.
How to test dark-mode typography
- Test with your real content: headings, labels, buttons, error messages and footer text, not only a sample paragraph.
- Measure the contrast of each text colour against its real background, using the ratios above as a guide.
- View the page on a phone, where small text is most likely to fail, and in bright light, where dark screens look different.
- Switch between light and dark modes, and check that nothing becomes unreadable when the theme changes.
- Run the page through an accessibility checker, and fix every contrast failure it reports.
The font accessibility guide explains the contrast requirements in more detail, and the Typography QA Lab checks readability for the text you enter.
Common mistakes
- Inverting a light theme by swapping black and white, without adjusting weight, size or spacing.
- Using pure white text on pure black for long articles.
- Leaving grey helper text at low contrast because it looks subtle on a large monitor.
- Forgetting that icons, charts and images also need enough contrast against the dark background.
Checklist
- Body text meets at least 4.5:1 against its background.
- Body text uses regular or medium weight, at 16px or larger.
- Line height is 1.5 to 1.7 for body text.
- Placeholders, links and focus rings are visible in dark mode.
- The page declares color-scheme: dark, so form controls match the theme.
- Every text style has been checked on a phone and in both themes.
Frequently Asked Questions
Should I use pure white text on a dark background?
Usually not for long reading. Pure white on pure black gives the highest contrast, 21:1, but it can cause glare and fatigue. Off-white or light grey text on a deep navy or charcoal surface is easier on the eyes and still passes the 4.5:1 requirement for body text.
Do thin font weights work in dark mode?
Often not. Light strokes can break up or look thinner on a dark background, especially at small sizes. Use regular or medium weight for body text, and reserve light weights for large headings where the strokes are thick enough to hold their shape.
How do I check contrast for dark-mode text?
Measure the text colour against the actual background it sits on, not against a generic black. Body text needs at least 4.5:1, and large text needs at least 3:1. The Typography QA Lab on this site runs readability checks on the text you enter.
Do I need a different font for dark mode?
No. The same font can work in both modes. What changes is the colour, the weight and the spacing, so most sites keep one font and adjust those settings for the dark theme.
Should every page have a dark theme?
Not necessarily, but respecting the visitor's system setting is a good default. Offer a theme switch where it helps, and make sure both themes meet the contrast requirements before you publish.