How to Use One Palette for Light and Dark Pages

A dark page needs more than reversed body text. Use Monochrome Newsroom to check the main reading pair and choose a caption color for each background.

One palette on light and dark pages

Light page

A quieter place to read.

Choose text for the background it sits on. Switching the app theme leaves these palette values unchanged.

Check supporting text against its own background.

Text #171717 · Surface #FFFFFF

Body text on page surface
17.93:1
Supporting text on page surface
7.00:1

Dark page

A quieter place to read.

Choose text for the background it sits on. Switching the app theme leaves these palette values unchanged.

Check supporting text against its own background.

Text #FFFFFF · Surface #171717

Body text on page surface
17.93:1
Supporting text on page surface
12.58:1

These previews check the selected text pairs. Review focus, borders and interaction in the finished component.

Reversing dark text and a light background preserves their contrast ratio. It does not settle the rest of a dark theme. With Monochrome Newsroom, we will define the two reading pairs and check what happens to a gray caption.

Keep the app theme separate

The app’s light or dark setting changes the workbench around your palette. It leaves the saved colors untouched, so you can design a light article while working in a dark interface. Assign the product’s theme roles in its own stylesheet.

TokenValueInitial purpose
--color-1#171717Dark ink or dark canvas
--color-2#FFFFFFLight canvas or light text
--color-3#595959Secondary text candidate
--color-4#D8D8D8Supporting light surface

Set the main reading pairs

For the light page, use #171717 text on #FFFFFF. Reverse those values for the dark page. Both pairs have 17.93:1 contrast, but keep separate rows in your notes because the text and background roles have changed.

ThemeBody textPage surfaceRatio
Light#171717#FFFFFF17.93:1
Dark#FFFFFF#17171717.93:1

Preview a paragraph and a heading at the intended width. Check the font, line spacing and nearby panels in both themes. The ratio cannot tell you whether a long paragraph feels crowded.

Check captions on both backgrounds

Do not carry the same gray caption into both layouts without checking it. The palette’s #595959 has a different ratio on white than on #171717. The word secondary says what the text does, not which color it needs.

Candidate useTextBackgroundRatioAA normal
Light caption#595959#FFFFFF7.00:1Pass
Dark caption, unchanged#595959#1717172.56:1Fail
Dark caption, explicit alternative#D8D8D8#17171712.58:1Pass

The last row assigns the existing #D8D8D8 swatch to the dark-page caption. Check links and button labels in the same way, particularly if their fills stay unchanged between themes.

Assign theme roles in CSS

:root {
  --color-1: #171717;
  --color-2: #FFFFFF;
  --color-3: #595959;
  --color-4: #D8D8D8;
  --page-surface: var(--color-2);
  --body-text: var(--color-1);
  --secondary-text: var(--color-3);
}
[data-product-theme="dark"] {
  --page-surface: var(--color-1);
  --body-text: var(--color-2);
  --secondary-text: var(--color-4);
}

The palette export supplies the four numbered variables. Keep the semantic assignments above in the consuming project. You can then distinguish a changed color value from a change to the role that uses it.

Review both layouts

  • Read a paragraph and a heading in both themes at their final sizes.
  • Check every text color against the actual panel behind it, including nested cards.
  • Review selected, disabled, hover and focus treatments independently.
  • Save the role record with the same revision as the exported palette.

Confirm that the four exported hex values stay the same after switching the app theme. If the product needs genuinely different color sets, save them as separate palettes with recognizable names.

Sources and further reading

Content reviewed: October 22, 2026