Guide
Building a usable color palette, not just a pretty one
A palette is more than five colors that look good together on a swatch. It has to work on a real page: a main color for the brand, a contrasting one for buttons, quiet ones for backgrounds, and text that people can read. This generator builds palettes from a base color with classic color harmonies, lets you lock the colors you like, and exports them straight into code.
Generating a palette
- Pick a base color with the picker, or type a hex code such as your brand color.
- Choose a harmony.
- Press Random (or the Space key) to explore new base colors.
- Lock any color you want to keep; it stays when the rest change.
- Copy individual hex codes, or export the whole palette.
The six harmonies
Harmonies are positions on the color wheel:
| Harmony | How it’s built | Feel | Good for |
|---|---|---|---|
| Analogous | Neighbors on the wheel | Calm, natural | Interfaces, documents, nature brands |
| Monochrome | One hue, different lightness | Elegant, consistent | Minimal sites, data visualization |
| Complementary | Opposite hues | Strong contrast | Call-to-action buttons, sports |
| Split complementary | Base plus the two neighbors of its opposite | Contrast, less tension | Marketing pages, posters |
| Triadic | Three hues evenly spaced | Vibrant, playful | Illustrations, games, children’s brands |
| Tetradic | Two complementary pairs | Rich, busy | Experienced designers; needs one dominant color |
If a palette feels chaotic, switch to analogous or monochrome; if it feels flat, try split complementary.
Applying a palette: the 60-30-10 rule
A classic interior-design guideline works well on screens too:
- 60% a dominant, usually light or neutral color: backgrounds.
- 30% a secondary color: cards, sections, navigation.
- 10% an accent: buttons, links and highlights, the things you want clicked.
Five colors don’t need equal space. Using the strongest color sparingly is what makes it stand out.
Check readability before committing
Harmony doesn’t guarantee readable text. Before using a palette color for text, or text on top of it, test the pair in the Contrast Checker. WCAG’s AA standard asks for 4.5:1 for body text. Light and very saturated colors usually work best as backgrounds or accents, with dark text on top.
Exporting
| Export | What you get | Use it in |
|---|---|---|
| CSS | :root with --color-1 to --color-5 |
Any website stylesheet |
| Tailwind | A brand scale 50–950 from the first color, plus palette-1 to palette-5 |
A Tailwind theme |
| JSON | An array of hex codes | Scripts, design tokens, apps |
After pasting, rename variables to their roles, such as --brand, --accent or --surface, so the code still makes sense when the colors change.
Tips for brand palettes
- Start from an existing logo color and lock it, then explore harmonies around it.
- Add neutrals: a near-white and a dark gray often matter more than a fifth bright color. The Color Converter makes tints and shades of any color.
- Test the palette on a real layout, not just on swatches; colors change with the surrounding area.
- Write the final hex codes into a short style guide so everyone uses the same values.
Who generates palettes
- Small-business owners choose colors for a new logo, website or shop.
- Web designers build interface palettes with accents and neutrals.
- Presenters give slide decks a consistent look.
- Students pick colors for posters and projects.
- Developers need a quick, harmonious set of colors for an app.
A complete example: colors for a café website
- Start from a warm brown that matches the café’s interior, and lock it.
- Choose Analogous for a calm, warm set, and press Space until the other colors feel right.
- Use the lightest color for backgrounds, the locked brown for headings, and the most saturated color only for buttons.
- Check button text against its background in the Contrast Checker.
- Export CSS variables and rename them to roles: –brand, –accent, –surface.
Tips
- Test colors on a real page layout, not only on swatches.
- Add a near-white and a dark gray; most of a page is neutral.
Related tools
- Color Converter to convert a color and build its shade scale.
- Contrast Checker for accessible text and background pairs.
- Image Color Picker to start from a photo or logo.
- CSS Gradient Generator to blend palette colors.
Checked against the current version of the Color Palette Generator on .

