Planning a Dark Palette With Divi 5 Relative Colors

By Interactive OnlinePublished Updated Editorial draft

Quick Answer

Build a dark palette around content roles such as page background, surface, text, links and focus indicators. Divi 5’s variables and relative colors can connect those values, but the relationships still need contrast checks in their actual combinations. A dark layout on a Canvas is a design exercise; it does not by itself implement a visitor-facing dark-mode switch or preference.

Changing a white background to black leaves many decisions unresolved. A muted label can disappear, a logo can lose its edge and a focus outline can merge with a button. Review the components the site uses before adjusting a base color globally.

Name roles before choosing shades

List the color roles in a representative page: background, raised surface, main text, secondary text, link, action fill, border and interaction state. Some roles may share a value, while others need different values in light and dark contexts.

Keep the names useful when the actual shade changes. A role such as “body text on dark surface” communicates more than a numbered swatch. Record the combinations in which that value is meant to appear.

Use relative colors as relationships

The Elegant Themes palette tutorial documents Design Variables and HSL-based relative color adjustments. It demonstrates a separate Canvas for comparing a dark design with a light design.

MDN’s relative-color guide explains deriving a color from another color. That connection can help maintain a palette, but it does not establish that the derived foreground has sufficient contrast against every surface.

When the base changes, review its dependent values. A useful relationship for a decorative border may produce an unsuitable body-text color. Keep exceptional roles explicit when a shared formula does not meet their requirements.

Compare components in both palettes

Use a representative page with paragraphs, links, cards, form fields and action controls. Include hover, focus, selected, error and disabled states where they exist. Review images and logos that may need a different treatment on dark surfaces.

W3C’s minimum text contrast guidance specifies 4.5:1 for ordinary text and 3:1 for qualifying large text, with defined exceptions. Measure the actual foreground/background combination rather than inferring contrast from a color’s HSL lightness.

Other controls and visual information have their own requirements. Passing a text contrast check does not complete an accessibility evaluation.

Separate the Canvas preview from mode switching

A comparison Canvas provides another design area. It can help the designer inspect the same types of content under a different palette. Shared variables can still affect content outside that Canvas, so choose which definitions are shared deliberately.

If the product needs a mode switch, define it as an interaction requirement. Decide how the visitor chooses a mode, whether a system preference is used and how the choice persists. Test the resulting page load and keyboard interaction rather than assuming a parallel dark design supplies that behavior.

The Canvas playground guide covers comparing reusable styles. The variable transfer guide covers keeping the definitions traceable across projects.

Record approved pairings

Keep the palette roles, approved component pairings and any exceptions with the design system. Review the dependent components when a brand change updates a base value. This gives future editors a reason for the choices instead of a collection of unexplained swatches.

Key Takeaways

  • Name colors by role and intended surface.
  • Relative colors need checks after a base color changes.
  • Review component states and measure actual text contrast.
  • A dark Canvas preview and a visitor mode switch are separate deliverables.

Frequently Asked Questions

Does increasing HSL lightness guarantee readable text?

No. Measure the contrast against the actual background. The color relationship alone does not establish a passing text combination.

Does a dark Canvas automatically follow the visitor’s system preference?

No such behavior follows from creating a comparison layout. Define and implement the preference and switching behavior separately.

Should every dark-mode color come from one formula?

Use shared relationships where they fit the roles. Keep exceptions when the component’s readability or interaction requirements need a different value.

For a planned palette change, include representative states and both modes in a scoped accessibility review and the WordPress design brief.

Archives