Low-Glare Dark Mode Palettes With Tested Contrast

Two monitors displaying white on black and softer blue on midnight navy beside three material color swatches.

A low-glare dark mode palette uses a dark surface and light text with enough contrast to read comfortably. Try midnight navy instead of pure black if bright strokes seem to bloom on your screen. Use the WebToolBase checker to test each text, link and control color against the surface behind it. WCAG contrast measures the color pair. Brightness, reflections and your own reading preferences still matter.

Start with the free dark mode palette and contrast checker if you already have a pair in mind. For a new design, pick a tested preset below and try it on a real paragraph, a form field and a link before you change the whole interface.

Why white text on pure black can look harsh

Put a small white label on a black navigation bar and the edges may look sharp at first. Set a whole page of narrow white text on that same background and the reading experience can change. People often call a visible fringe or glow around bright strokes halation. A bright room can add reflections, while a very dim room can make the brightest pixels stand out. Neither effect appears in a contrast calculator.

Midnight navy gives you room to use a softer foreground while keeping the text readable. Navy itself does not confer a contrast advantage. A charcoal and a navy with similar relative luminance can produce nearly the same measured ratio with the same foreground. Compare the two in the same lighting before attributing a difference to the hue.

The National Eye Institute lists blurred vision among the symptoms of astigmatism. A screen theme can change your reading preference, while an eye exam is the way to evaluate persistent blur. A controlled proofreading study by Piepenbrock, Mayr and Buchner found an advantage for dark characters on a light background, especially at small sizes. Its result supports keeping a light theme available. It does not establish one best palette for every reader or display.

What 4.5:1, 7:1 and 21:1 actually measure

The WCAG 2.2 text contrast criteria set the AA minimum at 4.5:1 for normal text and 3:1 for large text. Large means at least 18 pt regular or 14 pt bold, approximately 24 or 18.7 CSS pixels respectively. The AAA enhanced criteria set 7:1 for normal text and 4.5:1 for large text. White on black yields 21:1 in the WCAG relative-luminance calculation. That is the top of the ratio scale. The standard sets minimums and gives no universal upper comfort limit.

For component boundaries or graphical details required to identify a control or state, the non-text contrast criterion generally requires 3:1 against the adjacent color. A focus ring can touch the page canvas on one screen and a panel on another. Check both. WCAG also has separate keyboard focus criteria. A 3:1 reading alone does not test whether focus is visible, unobscured or sufficiently large for the applicable criterion.

Compare full-precision values with the thresholds. #777777 against #FFFFFF is approximately 4.478:1 and falls below 4.5:1, even though rounding to one decimal place would suggest a pass. Measure the rendered color after compositing opacity on its background. If an image or gradient sits behind text, evaluate the weakest area or add a solid backing.

Three tested dark mode palettes

Midnight navy suits pages that need distinct layers for reading and navigation. Soft slate is a neutral starting point when photographs or charts should supply the main color. Muted plum provides a warmer alternative. All three use a separate border token because a slight difference between the canvas and panel fills is often too subtle to identify a required control boundary.

PresetBody textSecondary textFocus ring
Midnight navy11.72:17.63:18.71:1
Soft slate11.43:17.08:19.84:1
Muted plum11.00:16.89:19.54:1
Three dark-mode presets with body text, secondary text and focus outline contrast measurements on their raised surfaces. The values also appear in the article.
Body text, secondary text and focus outline ratios against each raised surface. The same values appear in the comparison table.

Every hex value by role

RoleMidnight navySoft slateMuted plum
Canvas#101A2B#171B22#231C2B
Raised surface#1A2840#252C36#32263C
Body text#DCE6F3#E3E8EF#EADFEB
Secondary text#A9BCD5#ADB9C9#C4ADCA
Underlined link#82D5CF#A6C9FB#E6B8E9
Focus outline#F2BE72#FFD090#9BE1D2
Control border#687F9C#748394#90799B

The ratios are calculated for opaque sRGB colors. Test results apply to those pairs, in those roles. For example, muted plum secondary text scores 6.89:1 on its raised surface, clearing AA for normal text while falling short of AAA. Its control border measures 3.65:1 on the same surface. Treat these as starting values to verify in the interface.

Use the 30-row dataset to compare foreground colors on both surfaces. The file includes the calculated ratio and the threshold used for each pair.

Put midnight navy into a page without losing legibility

Take a project dashboard with a page title, a card, a due-date note, a link and a search field. Use #101A2B for the canvas and #1A2840 for the card. Body text #DCE6F3 measures 13.83:1 against the canvas and 11.72:1 against the card. The quieter #A9BCD5 still gives the due date 7.63:1 inside the card. Keep that note a normal size if it carries information people need.

An underlined teal link stays recognizable when viewed in grayscale. The same logic applies to statuses. Pair a red, green or amber state with a label such as Overdue, Complete or Pending. Run a sample of the result through the Color Blindness Simulator to see where colors that look distinct to you may converge.

.dark-preview {
  background: #101a2b;
  color: #dce6f3;
}
.dark-preview .card {
  background: #1a2840;
  border: 1px solid #687f9c;
}
.dark-preview .secondary { color: #a9bcd5; }
.dark-preview a {
  color: #82d5cf;
  text-decoration: underline;
  text-underline-offset: .16em;
}
.dark-preview :focus-visible {
  outline: 2px solid #f2be72;
  outline-offset: 3px;
}

On the actual dashboard, press Tab from the first link until you reach the last form action. Look for a focus outline clipped by a card, covered by a sticky footer or barely visible on a different background. Repeat at a narrow viewport and a larger text size. Contrast checks and these interaction checks catch different problems.

Compare two themes before replacing one

  1. Pick a real page with a paragraph, an underlined link and a form control. Keep text size and line spacing the same.
  2. Try white on black, one navy preset and a light option with dark text on a warm off-white field. Use the same screen and the same brightness for the first pass.
  3. Read the smallest text on each. Look for unclear letters, dim secondary text and a focus outline you lose while tabbing.
  4. Repeat in the lighting where you tend to read. If you adjust brightness, repeat the same comparison at that setting.
  5. Keep a Light, Dark or System setting where the interface supports it. Make it as easy to undo a theme change as it is to apply one.

The British Dyslexia Association style guide suggests dark text on a light, non-white background and recognizes personal color preferences. For a tablet planner, compare the text, writing guides and form fields on an actual page using the dark and light digital planner comparison. You can also browse the WebToolBase planner collection for layout options.

Questions about dark mode contrast

Is midnight navy better than pure black?

It is a useful alternative when white on black looks too sharp or bright. Compare both in the same conditions. Measure the text and control colors on the actual backgrounds in each theme.

Is 7:1 the best contrast for dark mode?

7:1 is the WCAG AAA threshold for normal text. It gives more contrast than AA requires. A comfortable setting also depends on text size, brightness, reflection and the person reading.

Can dark mode prevent halos from astigmatism?

A dark-mode preset cannot guarantee that halos will disappear. Try light and dark settings with the same text, and seek an eye exam for persistent blur or glare.

Can I get a passing result from a single hex color?

Contrast is a relationship between two colors. Enter a foreground and the specific background it appears on. Recheck the same foreground whenever the background changes.

To work through your own colors, open the WebToolBase dark mode contrast checker and test a text pair, a link pair and a focus pair in that order. For other combinations, the Color Palette Generator also offers color harmonies and palette export.

Once the color pair is settled, compare the lettering itself. The Font Pairing Tool lets you test size, spacing and reading width with your own paragraph. The readable font pairings guide explains how to record comfort and comprehension alongside speed.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top