Color palette generator
Complementary, analogous, triadic, split-complementary and monochromatic palettes from a single base color, with the HSL math worked out for you.
How it works
This color palette generator takes one base color and instantly produces five theory-based palette variations, complementary, analogous, triadic, split-complementary and monochromatic, so you can explore harmonious color schemes without doing the HSL math by hand.
- Set a base color
Type a hex code, use the swatch picker, or click Random color.
- Generate the palettes
Five harmony types appear, each as a row of five swatches.
- Copy what you need
Click any swatch for its hex value, or copy everything as CSS variables.
The five harmony types
Each palette is built by converting the base color to HSL (hue, saturation, lightness) and shifting the hue by a fixed amount around the color wheel:
- Complementary: the hue directly opposite the base, 180 degrees away, for maximum contrast.
- Analogous: hues neighboring the base, 15 and 30 degrees to each side, for a calm, cohesive look.
- Triadic: three hues spaced 120 degrees apart, an evenly balanced, vibrant combination.
- Split-complementary: the two hues next to the complement, 150 and 210 degrees away, nearly as much contrast with less tension.
- Monochromatic: the same hue at five different lightness levels, always a safe, cohesive choice.
Using a palette in CSS
Copy the hex values and define them as custom properties, then reference them throughout a stylesheet:
--color-primary: #14b8a6; --color-accent: #b84e14;
HSL is not perceptually uniform
These palettes are computed purely in HSL math and do not account for perceptual uniformity, as color spaces such as OKLCH or CIELAB do. Two colors at the same HSL lightness can still look noticeably different in brightness, so check contrast ratios with a dedicated accessibility checker before finalizing a UI palette.
Frequently asked questions
How do I generate a color palette from a single hex color?
Enter your hex code in the Base color field, for example #14b8a6, and click Generate palettes. The tool converts it to HSL, then computes five harmony types, complementary, analogous, triadic, split-complementary and monochromatic, each as a row of five swatches. Click any swatch to copy its hex value to your clipboard.
What is the difference between complementary and split-complementary color palettes?
A complementary palette pairs your base hue with the color directly opposite it on the color wheel, 180 degrees away, for maximum contrast. A split-complementary palette uses the two hues next to that opposite point, 150 and 210 degrees away, producing a similarly vibrant but slightly softer contrast that is easier to balance in UI design.
How do I use a generated palette in CSS?
Copy the hex values from the swatches and define them as CSS custom properties, for example --color-primary: #14b8a6; --color-accent: #b84e14;. Reference them throughout your stylesheet with var(--color-primary). The Copy all 5 palettes button copies every swatch from every harmony type at once, ready to paste into a :root block.
Can I start from a random color to get palette inspiration?
Yes. Click the Random color button to generate a random hex value and immediately compute all five palettes from it. This is useful for brand exploration when you do not already have a starting color in mind.
What is a limitation of browser-based palette generation?
The palette calculations are done purely in HSL math and do not account for perceptual uniformity, as the OKLCH or CIELAB color spaces do. Colors at equal HSL lightness can look visually different in brightness, so always verify contrast ratios with a dedicated accessibility checker before finalizing a UI palette.