Color Palette Generator

Build a palette from one hex colour: five harmony rules, WCAG AA/AAA contrast per swatch, tint and shade ramps, colour-blindness simulation, and CSS / Tailwind / JSON / PNG export.

Generators Runs in your browser · no upload

Reviewed 17 November 2026 · Free · No account needed

ExecutionYour browserInput never leaves your tab
File retentionNoneNothing is stored
AccountNot requiredNo sign-up, no paywall
PriceFreeNo trial, no usage cap on the tool itself

How to use

  1. Set the base colour with the picker, a hex value or the random button.
  2. Choose a harmony — complementary, analogous, triadic, tetradic or monochromatic.
  3. Click any swatch to copy its hex; read the WCAG ratio against white and ink, with AA/AAA ticks per swatch.
  4. Open the ramp to see tints and shades (2–5 steps each side), switch the colour-blindness simulation, then copy CSS variables, a Tailwind object or JSON, or download the palette as a PNG.

Example

Input: #2563eb, triadic, 4-step ramp

Output: 3 swatches with contrast grades, a 9-step ramp, CSS variables and a palette-2563eb.png

How it works

Starting from your colour, the tool computes harmonious companions — complementary, analogous and triadic — by rotating the hue on the colour wheel.

The base hex is converted to HSL, then companion colours are produced by rotating the hue while keeping saturation and lightness: complementary +180°, analogous ±30°, triadic +120°/+240°, tetradic +90°/+180°/+270°. Monochromatic instead varies lightness (±25, clamped to 12–92) and mutes one swatch by −30 saturation. Contrast against white uses WCAG relative luminance: (L1 + 0.05) ÷ (L2 + 0.05).

Worked example

#4f46e5 with the triadic rule → the base plus companions at +120° and +240°, with a 6.29:1 contrast ratio against white reported.

Edge cases to know

  • 3-digit hex is expanded (#abc becomes #aabbcc); anything malformed is rejected.
  • Conversions round to the nearest integer RGB channel, so a swatch can shift one step off the exact maths.
  • Harmonies are HSL-based (no perceptual OKLCH space), so a very dark or very pale base stays dark or pale across the whole palette.
  • The contrast check measures against white only.

Limits & compatibility

  • Harmonies are exact HSL rotations — perceptual spaces such as OKLCH are not used.
  • Contrast ratios use the WCAG 2.1 relative-luminance formula against white and the site ink only.
  • Colour-blindness views are matrix approximations, not a clinical simulation.
  • Conversions round to the nearest integer RGB channel.

Privacy

All colour maths, contrast grading and PNG rendering run in this tab. No colour data is uploaded, logged or stored.

Related tools

FAQ

Questions about Color Palette Generator

Which colour harmonies can it build?

Five, from a single base hex colour: complementary, analogous, triadic, tetradic and monochromatic. The maths is exact hue rotation in HSL space — for example, triadic takes your base hue and adds 120° and 240° rotations. Click any swatch to copy its hex value.

What does the contrast check tell me?

It shows the WCAG 2.x contrast ratio between each colour and white, so you can see whether text or backgrounds you pair with the palette will meet accessibility guidance. The ratio is computed from relative luminance. It checks against white only — not against black or other colours in the palette.

Why do my colours differ slightly from another tool?

Two reasons worth knowing. The harmonies are HSL-based rather than perceptual spaces such as OKLCH, which some modern tools use. And conversions round to the nearest integer RGB channel, so a converted hex value can sit a step away from the mathematically exact colour. Neither affects ordinary design work.

Does the palette data go anywhere?

No. All of the colour maths — HSL conversion, harmony rotation and WCAG contrast — runs locally in your browser. Nothing is transmitted, logged or stored, so you can experiment with unreleased brand colours without the values ever leaving your device.