Color Palette Generator

Generate accessible color palettes from a base hue and harmony rule

Your palette — click a swatch to copy its hex code

Harmony Rule

CSS Variables

:root {
  --color-1: #468ce5;
  --color-2: #4665e5;
  --color-3: #4f46e5;
  --color-4: #7746e5;
  --color-5: #9f46e5;
}

Tailwind Config

colors: {
  palette: {
    100: '#468ce5',
    200: '#4665e5',
    300: '#4f46e5',
    400: '#7746e5',
    500: '#9f46e5',
  },
},

How it works

Pick a base color and a harmony rule, and this tool generates a five-color palette using HSL color math -- complementary hues sit 180° apart on the color wheel, triadic hues 120° apart, and so on. Each swatch shows its WCAG contrast ratio against white (W) and black (B) text, with an AAA / AA / Fail badge so you can choose accessible combinations. Everything runs entirely in your browser; no colors or data are sent to any server.

Free Color Palette Generator

This free color palette generator builds a harmonious five-color scheme from any base color in seconds. Pick a starting color with the color picker, type a hex code, or drag the hue slider, then choose a harmony rule to instantly generate a palette you can use for websites, apps, branding, presentations, or print. Every calculation runs locally in your browser, so your colors stay private and the tool works instantly with no sign-up.

How Color Harmony Rules Work

Color harmony rules are formulas based on the position of hues around the color wheel. They take the guesswork out of combining colors by using relationships that have been proven to feel balanced to the human eye.

Accessibility-Aware Palette Choices

A beautiful palette is only useful if people can actually read the text placed on it. That is why every swatch in this generator displays its WCAG contrast ratio against both white and black text, along with an AAA, AA, or Fail badge. The Web Content Accessibility Guidelines recommend a minimum contrast ratio of 4.5:1 (AA) for normal text and 7:1 (AAA) for stronger accessibility. Checking contrast while you design — rather than after — saves rework and makes your product usable for people with low vision or color vision deficiencies.

Tips for Choosing Accessible Colors

Export Your Palette to Code

Once you are happy with a palette, export it with one click as CSS custom properties or as a Tailwind CSS config snippet. The CSS variables drop straight into your :root block, while the Tailwind object slots into your theme colors, so the palette you designed here becomes the palette your project actually ships with. You can also click any individual swatch to copy its hex code directly to your clipboard.

Add this tool to your site

Free to embed anywhere — paste this snippet into your HTML and the tool appears right on your page. It resizes itself automatically. Add data-theme="dark" or data-theme="auto" to match your site.

<script async src="https://whatsmytools.com/embed.js" data-tool="palette-generator"></script>
Preview embed

You might also like

Frequently Asked Questions

What do color harmony rules like complementary and triadic mean?
Harmony rules describe how colors are positioned relative to each other on the color wheel. Complementary colors sit 180° apart for maximum contrast, analogous colors sit next to each other for a calm look, triadic colors are spaced 120° apart, split-complementary uses the two hues adjacent to the complement, and tetradic uses four evenly spaced hues. Monochromatic palettes keep one hue and vary only lightness.
What is the WCAG contrast ratio shown on each swatch?
WCAG contrast ratio measures how readable text is against a background, on a scale from 1:1 (identical) to 21:1 (black on white). The Web Content Accessibility Guidelines require at least 4.5:1 for AA compliance and 7:1 for AAA compliance for normal-size text. Each swatch shows its ratio against both white and black text so you can pick accessible combinations.
How do I use the exported CSS variables?
Click the CSS Variables copy button and paste the snippet into your stylesheet, typically inside the :root selector. You can then reference any palette color anywhere in your CSS with var(--color-1) through var(--color-5). This keeps your colors in one place so updating the palette later only requires changing the variable values.
How many colors should a palette have?
Five colors is a practical sweet spot for most projects: a dominant color, one or two supporting colors, and lighter or darker variants for backgrounds and accents. Many designers follow the 60-30-10 rule, where the dominant color covers about 60% of the design, a secondary color 30%, and an accent 10%.
Is this color palette generator free and private?
Yes, the tool is completely free with no sign-up or limits. All color calculations, contrast checks, and exports happen locally in your browser using JavaScript. No colors, palettes, or any other data are ever sent to a server.