Introducing Dark Palette

For a long time, I wanted to add dark mode to websites built with modern WordPress block themes.

There are already plenty of dark mode plugins available. Most of them work by swapping stylesheets, injecting lots of CSS or trying to invert existing colours. While those approaches can work, they don’t really fit how modern WordPress themes are built.

Block themes already define their design through theme.json. So instead of replacing a website’s appearance, I wondered: what if every colour simply had a dark counterpart?

That’s exactly what Dark Palette does.

Instead of creating a separate dark theme, Dark Palette lets you define a dark version of your existing colour palette. Whenever dark mode is active, the plugin automatically swaps your theme’s colours for their dark counterparts. This keeps the design consistent while giving visitors a comfortable viewing experience.

Visitors can switch between Light, Dark and Auto mode using the Appearance Toggle block. Their preference is remembered, the correct appearance is applied before the page loads, and the plugin respects the operating system’s preferred colour scheme by default.

Dark Palette also gives website owners precise control over where dark mode should be available. It can be disabled for individual posts or pages, entire templates, archive pages, search results, password-protected content, 404 pages, the WordPress login screen or even the WooCommerce checkout. When dark mode isn’t available, you can decide whether the toggle should disappear, display an information message or remain visible in a disabled state with an explanation. The default message automatically follows the language of your WordPress installation, while custom messages can be defined globally or for individual pages.

Creating a balanced dark palette is easier thanks to the built-in live preview. As you adjust the dark counterparts of your colours, the preview immediately updates to show how backgrounds, text, links, buttons and accent colours work together.

Dark Palette is fully multilingual and automatically follows your WordPress installation’s language. The plugin currently includes English, German, French, Italian and Spanish translations for both the WordPress admin area and the block editor, making it feel like a natural part of WordPress rather than an add-on.

My goal wasn’t to build another dark mode plugin. I wanted to build one that works with modern WordPress instead of around it.

I hope Dark Palette makes it easier to create beautiful websites that look great both during the day and at night.

You can learn more about Dark Palette on my portfolio website, where I regularly share the projects I’m working on.
The complete source code is available on GitHub, where you can download the plugin, report issues, suggest new features or contribute to its development.