Color Palette Generator
Build complementary, analogous, triadic, split-complementary, tetradic and monochromatic palettes from one colour, with even perceived brightness, readable text colours and code to copy.
How to Use
- Enter your base colour (any CSS format) or pick one.
- Choose a harmony: complementary, analogous, triadic, split-complementary, tetradic, square or monochromatic.
- Keep OKLCH for colours that look equally bright, or switch to HSL for the classic colour-wheel result.
- Click a swatch to copy its hex. Each one shows whether white or black text reads better on it.
- Copy the whole palette as CSS variables, SCSS, JSON or a Tailwind colours block.
Worked Example
Find the complement of #3B82F6.
In HSL the colour is hsl(217°, 91%, 60%). Adding 180° gives hue 37°, so the complement is hsl(37°, 91%, 60%) = #F6AF3B, a bright amber. Measured in OKLCH, though, the blue has a lightness of 62.3% and the amber 80.3% — it looks much brighter, so the pair is unbalanced.
In OKLCH the blue is oklch(62.3% 0.188 259.8). Adding 180° gives hue 79.8° at the same lightness and chroma. A chroma of 0.188 is too saturated for a screen at that hue and lightness, so it is lowered to 0.129, giving #B07C00, a deep gold with exactly the same perceived lightness as the blue.
Show Work
Formulas
From Newton’s Wheel to OKLCH
Isaac Newton bent the spectrum into a circle in his Opticks (1704), and painters’ colour wheels followed, with harmonies defined as geometric shapes on the wheel. Johannes Itten’s teaching at the Bauhaus in the 1920s made complementary, triadic and split-complementary schemes standard design vocabulary.
Computer colour wheels inherited the idea through HSL and HSV (1978), which are simple rearrangements of RGB and ignore how bright colours actually look. OKLab and OKLCH, published by Björn Ottosson in 2020 and added to CSS Color Level 4, were fitted to perception data so that equal steps look equal — which is what a harmony rule always assumed.
About This Tool
This tool builds seven harmony types from any CSS colour, turning the hue in OKLCH (keeping perceived brightness) or HSL (the classic wheel). Colours that would fall outside the screen’s range have their chroma lowered just enough to fit, and every swatch shows the more readable text colour with its WCAG contrast ratio.
The wheel marks each hue, and the palette can be copied as CSS custom properties, SCSS, JSON, a Tailwind colours block or a plain hex list. Everything runs in your browser.
Related tools: Contrast Checker, CSS Variables Generator, and Palette from Image.
Frequently Asked Questions
What do the harmony rules mean?
They are fixed angles around the colour wheel from your base hue. Complementary adds the opposite hue (180°). Analogous uses neighbours on each side (30° by default). Triadic uses three hues 120° apart, split-complementary the two hues either side of the opposite (150° and 210°), tetradic two complementary pairs (60° and 180° apart), square four hues 90° apart, and monochromatic one hue at several lightnesses.
Why OKLCH instead of HSL?
HSL lightness is not how bright a colour looks: at the same HSL lightness, yellow looks far brighter than blue. Rotating the hue in HSL therefore gives palettes where one colour glares and another looks muddy. OKLCH is built so equal lightness looks equally bright, so a rotated palette keeps a steady brightness. The Lightness spread readout shows the difference.
Why are some colours marked “chroma reduced”?
Screens can show only so much saturation for each hue and lightness (the sRGB gamut). A vivid blue rotated to the same lightness in yellow may not exist on screen, so the tool lowers its chroma just enough to fit, keeping hue and lightness.
How is the text colour chosen?
For each swatch the tool works out the WCAG contrast of white and of black text and shows the better one with its ratio. 4.5:1 is the minimum for normal text under WCAG AA, and 3:1 for large text.
Is a harmony rule enough for a design?
It is a starting point. Most interfaces use one main colour, one accent and plenty of neutrals; a common split is about 60% neutral, 30% main and 10% accent. Use the harmony to pick the accent, then check contrast with the Contrast Checker.
How do I use the Color Palette Generator?
Simply pick your options and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.
Do I need to install or sign up for anything?
Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.
Is my information private?
Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.
Common Use Cases
Brand palettes
Start from a logo colour such as #3B82F6 and get a matching accent: its OKLCH complement is a warm orange at the same brightness.
Charts and data
Triadic or square palettes give 3–4 distinct series colours of equal brightness, so no line looks more important than another.
Design tokens
Export the palette as CSS custom properties or a Tailwind colours block and paste it into a project.
Learning colour theory
Switch between HSL and OKLCH on the same base to see why classic wheel harmonies can look uneven.
Last updated: