Building A Dark Mode Color Palette With Divi 5’s Relative Colors

by | Feb 6, 2026 | Etcetera | 0 comments

With Divi 5, darkish mode doesn’t should be a delicate set of overrides. You’ll design gentle and darkish layouts aspect by means of aspect, the usage of the similar construction and a shared colour gadget that remains simple to regulate.

We’ll get started with a light-mode structure, then construct a gloomy mode palette for it. We’ll construct a gloomy mode model within a Canvas, and follow the palette the usage of Divi 5’s Color System and Design Variables. On the finish, we’ll regulate a couple of HSL values and watch each layouts replace straight away, with out touching particular person modules.

A Sensible Gadget For Development Gentle & Darkish Mode Layouts In Divi 5

Divi 5 makes it more straightforward to control colour choices on the gadget stage, quite than updating modules one after the other. You’ll outline a small algorithm, follow them persistently, and regulate them later with out looking via a structure.

That manner is particularly helpful when gentle and darkish modes wish to coexist. On this walkthrough, we’ll construct a gloomy mode palette that remains in sync with the sunshine structure and stays simple to refine.

We’ll use 3 options in combination to do that.

The Colour Gadget For Defining Colour Roles

The Colour Gadget permits you to assign transparent roles in your colours. You’ll outline a number one colour, a secondary colour, heading textual content, and frame textual content. As soon as outlined, the ones colours will also be carried out persistently throughout modules, sections, buttons, borders, and icons.

Subscribe To Our YouTube Channel

What makes this convenient is that after a colour is ready, it may be reused all through your structure. Replace it later, and each and every component that makes use of it updates mechanically. Your design remains constant with out handbook remodel.

Learn Everything About Divi 5’s Improved Color System

Design Variables To Retailer Colours Globally & Create Computerized Diversifications

Design Variables are the place world colours reside. They retailer your world colour values and lead them to to be had all over the place within the builder. Presets can pull from them. Canvases can pull from them. Any module can pull from them.

Variables additionally strengthen relative colours, which makes the gadget extra versatile. You don’t need to create separate hex values for textual content, backgrounds, and accents. You’ll derive them from a base colour the usage of Hue, Saturation, and Lightness controls. Alternate the bottom colour, and all derived colours regulate accordingly. The relationships keep attached.

relative colors

Learn Everything About Divi 5’s Design Variables

Canvases To Design Trade Layouts With out Duplicating Content material

Canvases provide you with a separate design space that sits along your major web page structure. They’re steadily used for off-canvas menus or overlays, however they paintings simply as smartly for managing change design variations.

See also  ❗❗Black Friday Starts Tomorrow! Last Chance To Win A Free iMac

We’ll position the darkish mode model of the structure within a Canvas. The sunshine structure remains in the primary builder, and each variations percentage the similar colour variables. You’ll design them aspect by means of aspect, evaluate them without delay, and regulate each modes with out duplicating content material.

Learn Everything About Divi 5 Canvases

By means of combining the Colour Gadget, Design Variables, and Canvases, we will construct gentle and darkish layouts aspect by means of aspect the usage of a unmarried colour construction. The palette remains centralized, each layouts keep in sync, and adjustments stay simple to check and refine.

The Gentle-Mode Structure And Its Colour Construction

Earlier than construction darkish mode, we commence with a light-mode structure that already has a transparent and balanced colour construction.

On a brand new web page, import the structure.

This structure makes use of a easy palette constructed round two core colours. The main colour handles emphasis, and the secondary colour helps it.

The heading and frame textual content colours don’t should be impartial possible choices. They’re derived from the similar number one and secondary colours the usage of relative values. Headings pop out darker and extra outstanding, whilst frame textual content remains softer and more straightforward to learn over lengthy stretches. They keep visually attached as a result of they’re derived, now not separate choices.

light mode color palette

This construction makes the structure a excellent candidate for darkish mode. The hierarchy is already transparent, and colour roles are smartly outlined. Not anything is determined by hard-coded values that may destroy when the background adjustments.

Development A Darkish Mode Colour Palette With Divi 5

Darkish mode is dependent upon robust distinction. When the background turns into darker, each and every different colour wishes a transparent function so the design remains readable and structured.

A gloomy palette typically most effective wishes a couple of key colours. The background units the entire environment. Number one and secondary colours turn into your highlights. Heading and frame textual content colours keep watch over clarity. Accessory colours take care of borders, outlines, and small UI main points.

Right here’s the palette we’ll construct:

dark mode color palette

We’ll save those as Design Variables, which makes each and every colour to be had throughout each and every web page, module, and preset to your web page.

1. Create A New Canvas For Darkish Mode

We’ll position the darkish mode model within a Canvas. This assists in keeping the sunshine structure intact whilst giving us a separate house to use and verify a gloomy palette.

Within the Visible Builder, open the Major Canvas dropdown from the highest bar and click on Upload Canvas.

add canvas

Give the Canvas a transparent title, corresponding to Darkish Mode Structure.

add canvas dark mode

Don’t append the Canvas to the web page structure. Leaving it unappended assists in keeping the darkish structure totally break away the sunshine model. The Canvas exists along the web page.

As soon as the Canvas is created, Divi mechanically switches you into the Canvas view. You’ll see a clean workspace the place we’ll recreate the similar structure construction and follow the darkish mode colour palette the usage of variables.

dark mode canvas

Not anything at the entrance finish has modified at this level. The sunshine-mode structure stays unchanged. The Canvas offers us a parallel design house the place we will paintings on darkish mode with out affecting the unique web page. Now, import the sunshine mode structure once more so all we need to do is transfer colours.

See also  Wix vs Divi AI: Which AI Website Builder to Choose in 2024?

dark mode layout

2. Upload Number one & Secondary Colours

When you’ve uploaded the structure in your new Canvas, open the Variable Supervisor throughout the Visible Builder (left sidebar). That is the place you create and set up your entire world design variables.

variable manager

Open the Colours tab. The 4 number one, secondary, heading, and frame textual content colours from the sunshine mode structure are already outlined.

light mode colors

We gained’t change those colours. As an alternative, we’ll stay them as the bottom colours and create dark-mode permutations from them the usage of relative HSL. Click on Upload World Colour, title it Darkish Number one, and create the colour variation. First, make a choice the Number one Colour to attach the 2 colours. Then regulate the HSL values to 153 (Hue), -3 (Saturation), and -78 (Lightness), respectively.

Subsequent, create a Darkish Secondary colour by means of adjusting the HSL values to -66 (Hue), -11 (Saturation), and -67 (Lightness).

dark secondary

After saving, each variables will seem within the dynamic colour picker any place you’ll follow colour within Divi.

Those two colours turn into the bottom for all of the comparable colours we’ll create subsequent.

3. Create Relative Colours for Heading & Frame Textual content

Create the textual content colours as family of your number one and secondary colours. Get started with a Darkish Heading colour and make a choice the Darkish Number one swatch as the bottom. We’ll use this variable because the heading colour so headings keep related to the dark-mode palette.

dark heading color

Now create Darkish Frame Textual content as a relative colour in line with Darkish Number one. Building up Lightness till the textual content is conveniently readable at the darkish background, then save the variable.

adjust lightness for dark body color

Save Variables to verify each textual content colours.

4. Create A Background Colour

Create the Background colour as a relative colour of the Number one variable to stay it attached to the gadget. Click on Upload World Colour and title it Background Colour. Choose the Number one Colour swatch, then click on it once more to open the Filter out World Colour panel.

Use the Lightness slider to cut back Lightness till the result’s near-black (or as darkish as your design wishes). Since this can be a relative colour, it remains tied to Darkish Number one, even supposing the end result seems to be same old black.

background color

Save Variables to verify the background colour. The structure now has a gloomy basis that works with the heading, frame, number one, and secondary variables you already created.

This manner assists in keeping your background tied to the palette. In case your number one colour ever adjustments hue or tone, the background adjusts with the similar clear out gear with out breaking the gadget.

You’ll reuse your current Secondary Colour in darkish mode, or create a Darkish Secondary variation. On this instance, we created a Darkish Secondary.

Why This Palette Works

The darkish mode palette is able to use. It makes use of most effective two impartial colours: number one and secondary. Each different colour connects to the sort of two, this means that you’ll replace all of the palette by means of converting simply the bottom colours.

dark mode palette

The main and secondary colours outline the design’s persona. All textual content, accessory, and background colours keep related to them via relative filters, together with the black background. The palette remains constant, and changes stay easy with out redoing any a part of the structure.

Now we will verify the palette on a structure. Each heading, paragraph, border, and button will pull colour from the gadget we simply created.

See also  14 LinkedIn Banner Examples to Encourage Your Personal

Checking out The Darkish Mode Colour Palette

At this level, the darkish mode palette is absolutely outlined the usage of variables, and the structure throughout the Canvas is already attached to these values. Now we’ll check that the whole thing works as a gadget.

The use of The Inspector To Practice Variables Briefly

The structure throughout the Canvas nonetheless makes use of its default colours. We’ll use the Inspector to use the darkish mode variables in a single cross.

Choose parts without delay at the Canvas and use the Inspector to replace their colour homes. Headings, frame textual content, buttons, icons, and borders can all be attached to Design Variables from the Inspector panel with out opening complete module settings.

This makes it simple to paintings top-down. Click on throughout the structure, assign variables the place wanted, and transfer on with out breaking your float. As soon as a component connects to a variable, it mechanically remains in sync with the remainder of the colour gadget.

The use of the Inspector this fashion assists in keeping the setup rapid and intentional. You’re wiring the structure to the gadget that controls it, now not styling modules in my view. As soon as accomplished, right here’s how the structure will glance:

dark mode and light mode preview

Updating The Complete Structure By means of Converting One Colour

Now for the actual verify. Open the Variable Supervisor and replace the Number one colour. We’ll depart each and every different variable untouched.

Once the main colour adjustments, all of the darkish structure updates mechanically. Headings, frame textual content, background, accents, and UI main points all regulate in combination as a result of they’re derived from the similar base colour the usage of relative HSL values.

Not anything else must be edited. That is what makes construction darkish mode with variables and relative colours profitable. You’re adjusting the principles at the back of the structure, now not restyling it. The Canvas updates straight away, the sunshine structure stays untouched, and each modes keep completely in sync.

Divi 5’s Colour Gadget permits you to taste the principles at the back of the design, now not particular person modules. Darkish mode, gentle mode, and entire emblem shifts turn into a lot more straightforward to control.

Check out Divi 5’s Complicated Colour Gadget Nowadays!

With Divi 5, darkish mode doesn’t want duplicated layouts or fragile overrides. By means of combining the Color System, Design Variables, and a Canvas, you’ll construct gentle and darkish variations aspect by means of aspect the usage of the similar construction and shared laws.

As soon as your palette is outlined as variables, follow it temporarily with Inspector and stress-test it by means of adjusting a unmarried base colour. The darkish structure updates straight away. The sunshine structure remains untouched. Each modes stay in sync. The similar manner works for emblem refreshes and long-term design repairs.

The submit Building A Dark Mode Color Palette With Divi 5’s Relative Colors seemed first on Elegant Themes Blog.

WordPress Maintenance Plans | WordPress Hosting

read more

0 Comments

Submit a Comment

DON'T LET YOUR WEBSITE GET DESTROYED BY HACKERS!

Get your FREE copy of our Cyber Security for WordPress® whitepaper.

You'll also get exclusive access to discounts that are only found at the bottom of our WP CyberSec whitepaper.

You have Successfully Subscribed!