- Home
- Tools
- Color & Design
- Color Palette Generator
Color Palette Generator
Build a palette from one color: complementary, analogous, triadic, tints and shades.
HEX, rgb, hsl, oklch or a color name.
Harmonies
Click a color to copy its HEX code.
Complementary · the opposite hue, 180° away
Analogous · neighbors, 30° to either side
Triadic · three hues 120° apart
Split-complementary · both neighbors of the opposite hue, at 150° and 210°
Tetradic (square) · four hues 90° apart
Monochromatic · one hue, mixed with white and with black
Tints and shades
The outlined step is the base color itself.
Export
Where the colors come from
Every color on this page is calculated from the base color in OKLCH, a color model with separate numbers for lightness, chroma (how colorful) and hue.
The harmonies
A harmony is a set of hues at fixed angles from the base. The tool turns the hue and leaves lightness and chroma alone, so the colors in a set differ in hue and in nothing else.
- Complementary, the base and the hue 180° away. The strongest hue contrast there is. Good for one accent on a dominant color, tiring in equal amounts.
- Analogous, 30° to either side. Neighbors that always look related. There is little contrast, so lightness has to do the separating.
- Triadic, three hues 120° apart. Lively. It works best with one color in charge and the other two in small doses.
- Split-complementary, the base with the hues at 150° and 210°. The contrast of a complement, softened by taking its two neighbors.
- Tetradic, four hues 90° apart. Useful for the categories in a chart, hard to balance in a layout.
- Monochromatic, one hue. The base mixed one third and two thirds of the way to white, and to black.
Two things differ from most palette tools: the angles are measured on the OKLCH hue circle instead of the HSL one, and the lightness is kept. The HSL complement of the default violet is #abed3a, a lime that is far lighter than the violet. Here it is #707600, an olive of the same lightness.
That olive is less colorful than the violet, and it has to be: at this lightness a screen can show a much stronger violet than yellow-green. When a turned color falls outside what sRGB can show, its chroma is lowered until it fits. Lightness and hue are not touched.
Why not HSL
HSL lightness is the average of the largest and the smallest of the three channels, which says little about how light a color looks. Yellow, hsl(60, 100%, 50%), and blue, hsl(240, 100%, 50%), both have 50%; in OKLCH their lightness is 0.97 and 0.45. A scale built in HSL inherits the problem. Between 55% and 95% a yellow hardly gets any lighter to the eye, while a blue goes through most of its range and drifts toward violet on the way.
The scale from 50 to 950
The eleven steps are numbered the way Tailwind numbers its colors, from 50 (almost white) to 950 (almost black).
- Your base color is part of the scale, unchanged. It takes the step whose lightness is closest to its own: the default violet lands on 600, a yellow like
#facc15on 200. - Lighter steps are the base mixed with white, darker steps the base mixed with black. The mixing is done in OKLab, which keeps the hue where it is.
- The other steps are spaced so that 50 ends at a lightness of 0.975 and 950 at 0.26, unless the base itself lies beyond those.
For the default violet (lightness 0.541, chroma 0.247), step 300 has a lightness of 0.811. That is (0.811 − 0.541) ÷ (1 − 0.541) = 59% of the way to white, which leaves 41% of the chroma: 0.101. The result is #c4b5fd.
Mixing never adds color. A pale or grayish base gives a muted scale, so start from the most saturated version of your color.
None of this checks legibility. Before you put text in one step on top of another, run the pair through the contrast checker.
The exports
The Tailwind export is an object for theme.extend.colors in the configuration file. The scale is named primary in all three formats; rename it to whatever your project uses.