All guides
Guide

How to Build an Accessible Color Palette With Dark Mode

Build tonal scales around your brand colors, choose text and button colors by contrast ratio (4.5:1 for text, 3:1 for icons), plan dark mode as its own set of choices, and never rely on color alone for status.

Fastest way

Ask your AI to do it

Paste this into the AI agent you already use:

Help me use a Skill with another agent. Ask which agents and package I use, check supported locations and tools, identify any assumptions to change, and verify the workflow with a small example.

Quick answer

Give every brand color a scale of about eleven steps from near-white to near-black, built in a perceptual color space such as OKLCH so equal steps look equal. Keep the brand color itself as one of the steps. Then pick, for each use, the step that reaches WCAG contrast: 4.5:1 for body text and for text on buttons, 3:1 for icons, borders and large text.

When the brand color fails

Light and saturated brand colors, such as yellow, orange or a bright teal, often cannot carry white text. Do not lighten or darken the brand itself: keep it for large shapes, illustrations and accents, and use a darker step of the same hue for buttons and links.

Dark mode is a second set of choices

  • Backgrounds come from the darkest neutral steps, not pure black.
  • Buttons usually move to a lighter step of the brand color with dark text on it.
  • Check every pair again: a color that passes on white can fail on near-black.

Status colors and color blindness

About one in twelve men has a red–green color-vision deficiency, and green, amber and red can look alike to them. Pair every status color with an icon or a word, and check the set in a simulation.

Do it with an AI agent

PaletteForge builds OKLCH scales that keep each brand color exact, picks light and dark theme colors by WCAG contrast, simulates color blindness for status colors, and writes CSS custom properties, Tailwind themes and design tokens.

All guides