Dark Mode Palette Generator

Type your brand colour and we build two matching palettes for light and dark mode: backgrounds, text, borders and the brand colour tuned for each mode, with a WCAG contrast check for every colour and CSS that follows the visitor’s device setting.

Build the palette
AA 4.5:1 ✓

Palettes

Common dark mode mistakes

Do

  • A dark background tinted with your brand colour, not pure black
  • Lightening the primary so it stays readable
  • Lower saturation for long text

Avoid

  • Pure #000 with pure white
  • The same button colour in both modes
  • Automatic colour inversion

How does the code work?

The code defines colours as CSS variables and swaps them when the visitor’s device is in dark mode (prefers-color-scheme), and it respects a toggle you add by setting data-theme on the html element. Test colours on your type with the contrast checker, and get more shades with the colour converter.

Example: dark mode for a store

Enter the store colour, paste the code into Additional CSS, then replace fixed colours in your styles with variables like var(--bg) and var(--text). Open the store on a phone in dark mode and check prices and buttons are clear.

Key terms

Short definitions of what you meet along the way.

prefers-color-scheme
A CSS query that tells whether the visitor’s device is in dark mode.
Contrast ratio
How legible text is on its background; normal text needs at least 4.5:1.
CSS variables
Variables that hold colours and switch from one place.

Frequently asked questions

Did not find your answer? Ask us on WhatsApp

Will my site switch automatically?

Yes, if your styles use the variables instead of fixed colours, the site follows the visitor’s device setting.

Why does the button colour change in dark mode?

The same colour looks dull on a dark background, so we lighten it until contrast reaches 4.5:1.

Does it suit WordPress?

Yes, put the code in Additional CSS or a child theme, and use variables like var(--bg) in your styles.

Want a professionally designed brand and site?

We design modern Arabic websites with a consistent identity.

Contact us on WhatsApp