Colour Palette Generator
Free colour palette generator: press Space for harmonious schemes, lock colours you like, get Tailwind-style 50–950 shades and export CSS, Tailwind or JSON.
Generate colour palettes that work together: analogous, monochrome, complementary, triadic, split-complementary, square and pastel schemes are built in the OKLCH colour space, so lightness steps look even to the eye. Lock the colours you want to keep and generate again, edit any colour, then copy the HEX codes or export CSS variables, a Tailwind theme with 50–950 shades, SCSS or JSON.
Runs entirely in your browser and works offline. Nothing you enter or upload leaves your device. Free, no sign-up.
Features
- 8 harmony modes computed in OKLCH
- Lock, edit, reorder, add or remove colours (2–10)
- Tailwind-style 50–950 shade ramp for every colour
- Exports: CSS variables, Tailwind v4 @theme, Tailwind v3 config, SCSS, JSON
- WCAG contrast against white and black
- Shareable link and remembered palette
How to use Colour Palette Generator
- Press Space or Generate to get a new palette; pick a harmony such as Analogous or Triadic.
- Lock colours you like (padlock), then generate again to replace only the others.
- Click a colour to see its Tailwind-style 50–950 shades and contrast against white and black.
- Copy HEX codes, export the palette as CSS, Tailwind, SCSS or JSON, or copy a share link.
Frequently asked questions
What makes colours look good together?
Harmonies are based on positions on the colour wheel: analogous colours sit next to each other, complementary colours are opposite (180°), triadic colours are 120° apart. Varying lightness between light, mid and dark members matters as much as hue, which is why this generator spreads lightness across each palette.
What is OKLCH and why use it?
OKLCH describes a colour by perceived lightness (L), chroma (C) and hue (H). Unlike HSL, the same L value looks equally bright for every hue, so palettes and shade ramps built in OKLCH look balanced. Modern CSS supports it directly with the oklch() function.
How do I use these colours in Tailwind CSS?
Choose the Tailwind v4 export to get an @theme block of --color-* variables (classes such as bg-palette-1-500 then work), or Tailwind v3 for a theme.extend.colors object for tailwind.config.js. Rename palette-1, palette-2 to names such as brand or accent after pasting.
How are the 50–950 shades calculated?
Each shade uses the lightness ladder of Tailwind CSS v4's default palette (from about 97% at 50 to 26% at 950) with the selected colour's hue, and a chroma curve that peaks around 500–600. Colours outside the sRGB gamut have their chroma reduced so the HEX value stays accurate.
How do I check text contrast?
The contrast ratio of the selected colour against white and black is shown next to it. WCAG AA needs at least 4.5:1 for normal text and 3:1 for large text; AAA needs 7:1. Use the Color Converter tool to test any two colours against each other.
Related tools
- Colour Palette Extractor — Pull dominant colours out of an image with export-ready code
- Color Converter — HEX, RGB, HSL, OKLCH and a WCAG contrast checker
- CSS Generator — Gradients, shadows, radii and glassmorphism
- Colour Blindness Simulator — See a design through eight kinds of colour vision
- Image to SVG Converter — Trace PNG or JPG logos and line art into scalable SVG vectors