Color Palette Generator

Generate harmonious color palettes based on color theory principles. Create complementary, triadic, analogous, and other color schemes with hex, RGB, and HSL values.

How the Color Palette Generator works

Choose a base color and a color-harmony rule to get a palette of 2 to 5 colors, each with hex, RGB and HSL values. You can copy single colors or download the palette as CSS.

  1. Set Base Color with the color picker or type a 3- or 6-digit hex code such as #3B82F6 (the default). The refresh button next to it picks a random base color.
  2. Choose a Color Scheme: Complementary, Triadic, Analogous, Monochromatic, Split Complementary or Tetradic.
  3. Click Generate Color Palette.
  4. Click Copy under any swatch to copy its hex code.
  5. Click Download CSS to save color-palette.css, or Clear Palette to start over.

How each scheme is built

The base color is converted to HSL (hue, saturation, lightness), rounded to whole degrees and percentages. Most schemes keep the saturation and lightness and rotate the hue around the 360° color wheel:

Complementary: +180°, 2 colors. Triadic: +120° and +240°, 3 colors. Analogous: +30°, +60° and +90°, 4 colors. Split Complementary: +150° and +210°, 3 colors. Tetradic: +90°, +180° and +270°, 4 colors.

Monochromatic keeps the hue and saturation and uses lightness values of 20%, 40%, 60% and 80%, skipping any that equal the base color's lightness, for 4 or 5 colors. The base color is always the first swatch.

Worked example

The default #3B82F6 is rgb(59, 130, 246), or HSL 217°, 91%, 60%.

Complementary adds hue 37°, which is #F6AF3C. Triadic adds #F63C83 (337°) and #83F63C (97°). Monochromatic skips 60% because it matches the base, and adds #052861 (20%), #0950C3 (40%) and #9EC1FA (80%).

Inputs, export and privacy

The hex field accepts 3- or 6-digit codes, with or without "#"; shorthand such as #38F is expanded to #3388FF. Anything else shows an error and the Generate button stays disabled until the code is fixed.

Download CSS writes one class per color (.color-1, .color-2 and so on) with a background-color in hex and the RGB and HSL values as comments.

Everything runs in your browser.

Frequently asked questions

What is a complementary color?

It is the color directly opposite on the color wheel, 180° away in hue. Complementary pairs, such as blue and orange, give the strongest contrast of hue, which is why they are often used for accents.

What is the difference between triadic and tetradic palettes?

A triadic palette uses three hues spaced 120° apart. A tetradic palette in this tool uses four hues spaced 90° apart, forming a square on the color wheel.

Why does the monochromatic palette sometimes have only four colors?

It uses lightness values of 20%, 40%, 60% and 80% and skips any that equal your base color's lightness, so a base at exactly 60% gets three variations plus itself.

Why don't the generated colors look equally bright?

HSL lightness is not perceptual: a yellow and a blue at the same HSL lightness look very different in brightness. Adjust individual colors by eye, and check any text and background pairs with a contrast checker.

Are the generated palettes accessible?

The tool does not check contrast. Run the text and background combinations you plan to use through the Color Contrast Checker to confirm they meet WCAG AA.

Can I export the palette as CSS variables or Tailwind config?

No. Download CSS produces .color-1, .color-2 and similar classes with background-color values. Copy the hex codes into custom properties or your Tailwind theme by hand.

Similar Developer tools

3 related