Semantic Color Roles With Relative HSL in Divi 5

By Interactive OnlinePublished Updated Editorial draft

Quick Answer

Semantic color roles name a color’s job, such as primary action, information or warning. In Divi 5, connect repeated uses to named variables and derive variations where a shared relationship is appropriate. Keep status roles meaningful when the brand color changes. HSL controls and relative colors can manage relationships, but they do not automatically make text readable or communicate a status without other cues.

A warning message should remain recognizable after a brand refresh. Tying every status to a rotating brand hue can make that difficult.

Map roles to actual interface uses

List the roles the website needs before entering values: primary action, information surface, warning surface, warning text and warning border, for example. A role can need several related colors because text, surfaces and borders have different contrast relationships.

The December 16, 2025 publisher tutorial describes semantic roles and Divi’s HSL filters. Its distinction between a warning base and brand-derived variations is useful when planning a system that must survive later edits.

Distinguish a linked variation from a static value

A manually entered HSL color is a value. It does not stay connected to a second value merely because the numbers look similar. A shared variable or explicit relative-color relationship supplies that connection.

MDN’s hsl() reference explains absolute and relative syntax. In a supported implementation, a relative color can start from an origin and change selected channels. Review the installed builder’s controls and the supported browsers before relying on the resulting output.

Derive a pale information surface from an approved information base when that relationship fits. Keep the warning base independently defined if a brand-hue change should not change its meaning. Document the intended dependency rather than creating an unexplained chain of adjustments.

Check role pairs in their real contexts

Test warning text against the warning surface, the border against adjacent surfaces, and links or buttons inside the message. HSL lightness is not the same quantity as the luminance contrast used in accessibility evaluation.

The W3C use-of-color guidance requires information to remain available beyond color alone. Include a useful message or another appropriate cue. A yellow background cannot explain what needs attention.

Check hover, focus and error states as part of the role, not after applying it throughout the site. Our interaction-state guide examines that separate set of decisions.

Test a controlled base-color change

On a development copy, change one base variable and inspect representative uses. Confirm that intended variations follow it, independent status bases remain appropriate, and local overrides have not broken the relationship.

Restore or approve the test values deliberately. Record the role map for future editors. Our preset-system guide explains how reusable groups can apply those roles to components, and ongoing development can support shared changes.

Key Takeaways

  • Name roles according to their interface purpose.
  • Use explicit relationships for connected variations.
  • Keep status meaning stable through brand changes.
  • Check actual pairs and add non-color information cues.

Frequently Asked Questions

Does HSL automatically create a shared color system?

No. Establish variables or explicit relationships and apply them to the intended uses.

Should warning yellow always be derived from the primary color?

Only if that dependency makes sense through expected changes. An independently approved warning base may preserve its meaning more reliably.

Does making a color darker prove adequate contrast?

No. Evaluate the actual foreground/background pair and the applicable criterion. A channel adjustment is not a contrast test.

Archives