A dark mode palette usually fails in a quiet way: the brand color survives, but everything around it is improvised. The page background is one gray, the card on top of it is another gray from a different project, and the text is a third guess. The colors are all dark, so they look related, until you place them side by side and the seams show.
There is a tidier way. Start from the one color you already have, the base color your product is known by, and generate a full scale around it: shades stepping toward black on one side, tints stepping toward white on the other. The palette comes from assigning those values to roles in an order that, in dark mode, is not the one most designers learned first. This guide builds the palette step by step with the free Color Shades and Tints Generator on Ovatly.
Contents
- Quick answer
- What the scale actually gives you
- The inversion: roles flip in dark mode
- How to build the palette, step by step
- Worked example: nine values, assigned in order
- Limitations and honest tradeoffs
- Common mistakes
- FAQs
- Conclusion
Quick answer
Enter your base color in the Color Shades and Tints Generator, choose four steps per side, and assign the nine values from the dark end: the darkest shades become your surfaces, page first, then cards one step apart; the base color stays the primary action; and the tints become the text end, with the palest tint for the most important text. Check the surface steps at real size, because equal percentage steps do not look equally spaced.
What the scale actually gives you
The generator builds a scale around a single base color. Shades mix the base toward black and tints mix it toward white, in even percentage steps. The percentages describe the mix amount: the deepest shade in a four-step scale is the base mixed 80 percent toward black, and the palest tint is the base mixed 80 percent toward white.
Two properties of that construction matter for dark mode. First, every value stays in the same color family, because every value is the base color plus black or white and nothing else, so a dark interface built from one scale cannot drift into unrelated grays. Second, the mixing is a straight line in RGB space, simple and predictable: the same base and step count always produce the same scale, so the palette can be rebuilt exactly.
The scale was designed for hover states, borders, backgrounds and text variants in one family. Dark mode uses all of those, arranged differently.
The inversion: roles flip in dark mode
The generator's own working rule is to use darker steps for text and lighter steps for surfaces. That rule is written for light interfaces, where text must be dark to sit on pale surfaces.
A dark interface turns the rule around. The surfaces are now the dark end of the scale, and the text is the light end. So the assignment inverts:
- The darkest shades become surfaces: the page background first, then raised surfaces, each one step lighter than the layer beneath it.
- The base color keeps its light-theme job: the primary action, the accent, the color users recognize.
- The tints become the text end: stronger tints for headings, the palest tint for body text on the darkest surface.
Nothing about the scale changes. Only the reading direction changes.
How to build the palette, step by step
- Open the Color Shades and Tints Generator and enter your base color as a HEX value or with the swatch. Use the same base color as your light theme.
- Choose four steps per side. Nine values in total: surface layers, the action color and the text end.
- Copy the whole scale at once and lay the values out in order, darkest to lightest.
- Assign from the dark end: darkest shade to the page background, the next shade up to cards and panels, and one more step if you need a second raised layer.
- Leave the base color in place as the primary action and main accent. Do not promote a shade or tint into that job.
- Assign the tints to text: a mid tint for secondary text, a stronger tint for headings, and the palest tint for body text on the darkest surface.
- Preview the palette at real size, in a real layout, and look hardest at the surface steps. That check is where this method succeeds or fails.
Worked example: nine values, assigned in order
Take the base color #2563EB with four steps per side. The generator returns this scale, darkest to lightest:
#07142F: the deepest shade, 80 percent toward black#0F285E#163B8D#1E4FBC#2563EB: the base itself#5182EF#7CA1F3#A8C1F7#D3E0FB: the palest tint, 80 percent toward white
Assigned to dark mode roles in order: #07142F is the page background. #0F285E, one step up, is the card and panel surface. #163B8D covers a second raised layer and borders. #1E4FBC covers pressed surfaces. The base #2563EB stays the primary button and the main accent, unchanged from the light theme. On the light end, #5182EF works for secondary text and quiet labels, #7CA1F3 and #A8C1F7 step up through headings, and #D3E0FB carries body text on the darkest surfaces. Adjacent roles get adjacent steps, so the eye reads the layering as one family brightening as it rises, and the base never moves.
Limitations and honest tradeoffs
The spacing caveat does real work in dark mode. Equal percentage steps do not look equally spaced, because human vision is more sensitive in dark tones. On the shade side that matters a great deal: two surface shades one step apart can look almost identical in one place and oddly far apart in another. No setting removes this. The defence is procedural: check the surface steps at real size, in the real layout, before shipping.
The second limit is the mixing model. A straight line in RGB space is simple and predictable, but perceptual scales such as OKLCH ramps curve differently and can keep mid-tones more vivid. If a step in your scale looks dull next to its neighbours, adjusting that one step by hand is a legitimate finish.
Common mistakes
- Copying the light theme's assignment into dark mode. Darker for text and lighter for surfaces is the light-interface rule. In dark mode the surfaces take the dark end and the text takes the light end.
- Building surfaces from unrelated grays. A gray picked from another project breaks the family. Every surface should come from the one scale.
- Skipping steps between layers. Page, card and menu need adjacent steps. Jump two steps and the layer looks like a different theme.
- Judging the dark steps on a swatch strip. Equal percentages do not look equally spaced. Judge surfaces at real size, in place.
- Replacing the base color with a tint for buttons. The base is the recognition color. Tints are the text end; the action keeps the original value in both themes.
FAQs
Can one base color really cover a whole dark mode palette? For the interface's own family, yes. A scale with four steps per side gives nine values in one color family: the shades become surfaces, the base stays the primary action color, and the tints become the text end. Other hues a product needs, such as separate status colors, are separate decisions outside this one scale.
Why do my dark surface steps look uneven when the percentages are even? Because equal percentage steps do not look equally spaced to the eye. Human vision is more sensitive in dark tones, so the same percentage gap reads larger between two dark shades than between two light tints. Check the surface steps at real size.
Should dark mode text use the base color or a tint? A tint. In a dark interface the text sits on dark surfaces, so it needs the light end of the scale. The base color keeps its job as the primary action and accent, and the palest tints carry headings and body text.
What if the mid-tones in my scale look dull? That is a known property of the mixing method. The scale mixes in a straight line in RGB space, which is simple and predictable, while perceptual scales such as OKLCH ramps curve differently and can keep mid-tones more vivid. Adjusting a dull step by hand is a legitimate finishing move, not a failure of the method.
How many steps per side do I need? Four steps per side, nine values including the base, covers most interfaces: enough shades for layered surfaces and enough tints for the text end. Data visualization may want more steps, because it needs many distinguishable values.
Conclusion
A dark mode palette built from one scale has a property improvised palettes never have: every value in it is provably related to the one color your users already know. Generate the scale with the Color Shades and Tints Generator, assign from the dark end, keep the base as the action, and check the surface steps where the eye is most sensitive. The state changes that sit on top of such a palette follow the same step logic, and our companion guide on using shades for hover and active states works through them. For more guides in this series, see the Color and Design Tools guides.