Color Palette Generator
Build harmonious color palettes from any base. Complementary, analogous, triadic, tetradic, split-complementary, and monochromatic harmonies — with WCAG contrast checks and Tailwind / CSS / token export.
- Six classical color harmonies in one canvas
- Locks any swatch and rebuilds the rest around it
- WCAG AA / AAA pair check on every swatch
- Export Tailwind config, CSS variables, or design tokens (W3C DTCG)
Direct answer
Color Palette Generator
#64ADF2
#6467F2
#A864F2
CSS Variables
:root {
--color-1: #64ADF2;
--color-2: #6467F2;
--color-3: #A864F2;
}When this saves you time
Real workflows where color palette generator replaces tedious manual work or an in-app subscription tool.
Seed a brand palette from one hero color
Build a UI palette with accessible pairs
Design a campaign palette from a stock photo
Pick categorical chart colors that don't collide
Pre-flight a Pantone palette without buying a guide
Mirror a light palette into a dark theme
How it works
The methodology — every transformation documented so the output is reproducible.
Pick a base color
Drop in a HEX, RGB, or HSL. The generator normalizes to HSL because hue-wheel harmonies are easiest to compute and reason about in that space.
Select a harmony
Six rules: monochromatic (single hue, varied lightness), analogous (hues within ±30°), complementary (180°), split-complementary (180° ± 30°), triadic (120° apart), tetradic (90° apart).
Rebuild and refine
Every swatch gets re-computed live as you drag the hue. Lock a swatch and the rest re-balance around it — useful when one color is brand-locked.
Audit + export
Per swatch: WCAG AA/AAA scores against black + white, recommended text color, and HEX/RGB/HSL strings. Export the whole palette as Tailwind v3 colors, CSS variables, or W3C DTCG tokens.
Worked examples
| Input | Result | Notes |
|---|---|---|
| #7A3DFF · Complementary | #7A3DFF, #C2FF3D | Direct opposites on the hue wheel. High contrast — great for CTAs. |
| #FF6900 · Triadic | #FF6900, #0069FF, #69FF00 | Three hues 120° apart. Strong, vibrant, used in playful brands. |
| #0EA5E9 · Analogous | #0EA5E9, #0EE9C8, #0E72E9 | Hues within ±30°. Calm, harmonious — common in product UIs. |
| #16A34A · Monochromatic | #0F6E33, #16A34A, #4ADE80, #BBF7D0 | Single hue, varied lightness/saturation. Good for state ramps (success, info). |
Common mistakes to avoid
Treating harmony as a brand decision
Ignoring lightness when picking accents
Forgetting that HSL is not perceptual
Skipping the contrast audit on accent swatches
Frequently Asked Questions
Why HSL is the right space for harmony math
Color harmonies were codified in the 19th century by theorists like Chevreul and Itten, who worked in pigment color wheels. The modern HSL (hue/saturation/lightness) cylinder is a direct descendent: hue is an angle around the wheel, which makes harmonies expressible as simple offsets — 180° for complementary, 120° for triadic, ±30° for analogous. RGB or HEX cannot represent these relationships without trigonometric gymnastics.
The downside: HSL is geometric, not perceptual. Equal lightness values in HSL look very different to the eye — yellow at L=50 feels much brighter than blue at L=50. For perceptually consistent palettes, designers increasingly use OKLCH or LCh, which preserve the angular hue intuition while normalizing perceived lightness. We expose HSL by default for familiarity and run an OKLCH check behind the scenes when surfacing the accessibility ratings.
How many colors should a palette have?
For a brand identity, 1 primary + 1 secondary + 2 accents + 5 neutrals is the working minimum — enough to compose a website, an email, and a deck without ever feeling cramped. For a product UI, expect 5 ramps × 9 stops = 45 tokens once success/warning/error and surface tints are accounted for. The palette generator outputs the seed; you can expand to the full token set with the Design Token Generator.
Going from palette to production
Once a palette feels right, the next step is freezing it as tokens. We support three exports:
- CSS variables: a flat
:rootwith one variable per swatch — drop-in for any framework. - Tailwind v3 config: nested under
theme.extend.colorswith semantic names you choose. - W3C DTCG JSON: design-token format consumed by Style Dictionary, Figma Tokens Studio, and most modern design-system pipelines.
Color theory references we lean on
The generator's rules are conservative and well-documented in Itten’s The Art of Color (1961) and Albers’ Interaction of Color (1963). We do not invent new harmonies — we expose the classical six with modern accessibility and export tooling layered on top.