Color palette generator

Press Space for a new palette, lock the colours you want to keep, and keep going until it feels right. Build palettes from colour harmonies or pull one out of a photo, check how readable text is on each colour, and copy the result as code or save it as an image.

  • Free
  • No sign-up
  • Nothing uploaded
Loading the tool…
  • Colour harmonies, or colours from a photo
  • Lock, edit and reorder 3 to 8 colours
  • Text contrast on every colour
  • CSS, Tailwind, JSON, PNG and SVG export

How to make a color palette

Four steps, start to finish.

  1. 1

    Generate

    Press Space or Generate for a new palette. Choose a harmony, or let it surprise you.

  2. 2

    Lock and adjust

    Lock the colours you like; Generate only changes the rest. Click a colour's picker to fine-tune it.

  3. 3

    Check readability

    The table shows each colour's contrast with white and black text, and whether it passes for body text.

  4. 4

    Export

    Copy CSS variables, a Tailwind theme or JSON, or download the palette as a PNG or SVG.

How the generator builds a palette

Each palette follows a colour harmony: a rule for picking hues that sit well together on the colour wheel. Lightness runs from dark to light across the palette, so you always get colours for text, backgrounds and accents, not five shades that all look alike. The colours are built in OKLCH, a colour space where equal steps of lightness look equally far apart to the eye, which keeps the light and dark ends of a palette even.

The harmonies you can pick
HarmonyHow the hues are chosenFeels
AnalogousNeighbours on the wheel, within about 80°Calm and natural
MonochromaticOne hue, in different lightness and strengthClean and focused
ComplementaryTwo hues opposite each otherBold, high contrast
Split complementaryOne hue and the two either side of its oppositeLively but balanced
TriadicThree hues evenly spacedPlayful and varied
TetradicFour hues evenly spacedRich; needs one colour to lead

Surprise me picks a different harmony every time you generate. When you lock a colour, the next palettes are built around its hue, so the new colours fit the one you chose.

Start from a colour you already have

  • A brand colour: click any colour's picker, type its hex code, lock it, then press Space until the rest fit around it.
  • A photo: choose From a photo and the tool finds the main colours of the picture, as many as your palette has. It's a quick way to match a design to a product shot, a venue or a wedding theme. The photo is read in your browser and never uploaded.
  • A colour on your screen: in browsers that support it, the picker's eyedropper picks a colour from anywhere on the page.

Drag colours by their handle to reorder them, add up to eight, or remove the ones you don't need (down to three).

Turning a palette into a design

A palette works best when every colour has a job. A common starting point is the 60-30-10 rule: about 60% of the design in a main colour (often a light background), 30% in a secondary colour (panels, photos, larger shapes) and 10% in an accent that draws the eye to buttons, prices or headings.

  1. Pick the background: usually the lightest colour, or the darkest for a dark design.
  2. Pick the text colour: the one with the strongest contrast against that background.
  3. Pick an accent for the one thing you want noticed first.
  4. Use the remaining colours sparingly, for supporting shapes and details.

Check that text stays readable

The table under the palette gives each colour's contrast ratio with white and with black text, from 1 (no contrast) to 21 (black on white). The Web Content Accessibility Guidelines (WCAG) ask for at least 4.5 to 1 for body text, which the table marks as AA, and 3 to 1 for large headings. Text that fails is hard to read on phones in sunlight, in print and for people with low vision.

If your favourite colour fails with both white and black text, keep it for shapes and accents, and set the text on a lighter or darker colour from the palette.

Export and share

  • CSS variables: a :root block with one variable per colour, ready for a stylesheet.
  • Tailwind theme: an @theme block for Tailwind CSS version 4, which turns the colours into utility classes.
  • JSON: a plain list of hex codes for scripts and design tokens.
  • PNG and SVG: a swatch sheet with each hex code, for mood boards, briefs and presentations.
  • A link: the palette is saved in the page's address, so copying the URL shares the exact palette, and a reload brings it back.

To use a palette in a design, start one from the templates and set its colours from your hex codes. Pair it with a matching background from the gradient generator.

Updated

Color palette generator: common questions

What people ask before they use it.

Is the color palette generator free?

Yes, with no account and no limit. Palettes you make are yours to use in any project, including commercial work.

How do I keep a colour while generating new ones?

Click the lock on that colour. Generate and the Space bar change only the unlocked colours, and the new ones are chosen to fit around the locked hue.

Can I get a palette from an image?

Yes. Choose From a photo and pick a picture; the tool finds its main colours, as many as your palette has. The picture stays in your browser.

How do I save a palette?

Copy the page's address: the colours are in the link. You can also download the palette as a PNG or SVG, or copy it as CSS, Tailwind or JSON.

What does AA mean in the table?

It means white or black text on that colour reaches a contrast of at least 4.5 to 1, the WCAG level AA minimum for body text.