How to use the palette generator
- Choose a base color, such as your brand color.
- Pick a harmony for the accent colors: complementary for strong contrast, analogous for calm, triadic for variety.
- Adjust hue drift if you want the scale to warm or cool towards its ends.
- Name the palette for the export (for example brand or indigo).
- Review the checks to see which shades are text-safe.
- Export CSS variables, an SCSS map, Tailwind (v4
@themeand a v3 config) or JSON design tokens.
Using a shade scale
- 50–100: subtle backgrounds, hover states, selected rows.
- 200–300: borders and dividers on light themes.
- 400–500: icons, accents, large decorative elements.
- 600–700: buttons, links and text on white.
- 800–950: headings, dark surfaces and dark-mode backgrounds.
How it works
The base color is converted to OKLCH, which separates lightness, chroma (colorfulness) and hue. Harmonies such as complementary, analogous and triadic rotate the hue while keeping lightness and chroma. The shade scale sets fixed lightness targets for each step from 50 to 950 and reduces chroma where needed to stay inside the sRGB gamut, so every shade is a real, displayable color. Text-safe shades are marked by checking their contrast against white and black.
Worked examples
Example 1: a SaaS brand
Load Indigo with the complementary harmony. Use 600 for primary buttons (white text passes), 50 for selected states, and the amber accent for highlights such as “new” badges.
Example 2: a calm health app
Load Teal with triadic harmony and pull back the accent colors’ use to illustrations. Teal 700 works for links and 100 for soft section backgrounds.
Example 3: neutral greys
Load Slate. A slightly blue-tinted grey scale looks crisper than pure grey. Use 900 for text, 600 for secondary text and 200 for borders.
Common mistakes
- Using mid shades for text. 400–500 rarely pass on white; check the list.
- Too many accent colors. One base plus one accent is usually enough for UI.
- Ignoring dark mode. Plan which shades swap roles on dark backgrounds.
Using a palette in practice
Pick a small set of roles first: a background, a surface, text, muted text, a primary action and a status color or two. Assign palette steps to those roles, then check every text pairing for contrast. The 50–950 scale makes this easier because light steps work for backgrounds and dark steps for text. Keep a record of which step plays which role so new pages stay consistent. Revisit the palette after real use; small adjustments are easier than a full redesign later.