Color Palette Generator

Generate 5-color palettes with random, complementary, analogous or triadic harmony, lock the swatches you like, and export HEX, CSS variables or a PNG.

🌐 Español

#592ba3
#de5336
#4dda46
#d7e565
#bf34a5

Click a lock icon to keep that color, then regenerate — locked colors never change.

🔒 Private by design: everything runs locally in your browser and never uploaded to any server.

Staring at a blank canvas trying to invent five colors that belong together is a bad use of an afternoon. Rolling dice against a color wheel until something clicks, then pinning the keepers and rolling again, is a much better one. That is the whole loop this page implements.

One random base hue, five swatches, four rules

Three of the four harmony modes pick a single random base hue and lay the five swatches over a fixed pattern of offsets from it.

Rolling, locking and taking it away

  1. A random row appears the moment the page loads, so there is nothing to submit and no empty state to fill in.
  2. Choose a rule from the Harmony mode dropdown if you want one.
  3. Press the Regenerate (or press Space) button, or just tap the spacebar anywhere outside a form field, to roll a new row.
  4. Click the padlock on any swatch you want to keep. It flips to a closed lock and that color is skipped by every subsequent roll.
  5. Take the result with Copy HEX list, Copy CSS variables or Download PNG.

The spacebar shortcut deliberately stands down whenever focus is inside an input, a select, a textarea or anything editable, so the dropdown stays keyboard-navigable and a space typed elsewhere on the page is still a space. When it does fire it suppresses the default action, so the page will not scroll out from under you while you are rolling.

Changing the mode does not reroll the row

The dropdown records a preference for the next generation and nothing more. The swatches on screen were built under whichever rule was active when they were generated, and they stay exactly as they are until you regenerate. It is a small thing that catches people out, and it exists so that flipping between modes to read the descriptions cannot wipe a row you were curating.

A lock keeps the color, not the harmony

This is the behavior worth understanding before you rely on it. Every regeneration produces a completely fresh palette from a completely new random base hue, and then your locked swatches are dropped back into their positions unchanged. The lock is a guarantee about a color, not a constraint on the generator.

In practice that means a locked teal sitting in a triadic row will usually not belong to the triad the other four swatches were just drawn from. If you want a palette that genuinely radiates from one anchor color, the honest workflow is to roll until the whole row pleases you rather than to lock one swatch and grind.

Saturation 55 to 75, lightness 40 to 70

Hue is the only thing the harmony rules control. Saturation and lightness are rolled independently for every swatch, within a fixed window: 55 to 75 percent saturation, 40 to 70 percent lightness. Those bounds are what stop a triadic palette from being three identical-looking blocks, and they keep every swatch in a mid range rather than out at the extremes.

The cost is a real one, so plan around it: you cannot roll a near-black, a near-white or a pastel here. A design system usually wants those too, and the color converter is the quicker route to a darker or lighter variant once you have a base you like.

Three exports, and the 800 by 200 strip

The hex export is one code per line, plain text, ready to paste anywhere. The CSS export is a :root block with the colors named --color-1 through --color-5, which drops straight into a stylesheet. The PNG is an 800 by 200 strip written to color-palette.png, five equal 160 pixel columns with no gaps and no labels, which is what you want for a mood board or a client email.

Nothing is saved. There is no account, no server call and no local storage in this widget at all, so the row lives only in the open tab.

Two things worth doing before a palette ships. Run any pair that will carry text through the WCAG contrast checker, because a harmonious palette says nothing about legibility. Then push the whole set through the color blindness simulator, since a triadic red and green can be a delight to look at and completely indistinguishable to a significant slice of your readers. From there the CSS gradient generator and the rest of the generators hub pick up the actual building.

See it in action

Screenshot of the Color Palette Generator tool with a generated palette shown as full-height colour columns, each with its hex value and a lock button so a colour can be kept while the rest are regenerated
Color Palette Generator mid-process: a generated palette shown as full-height colour columns, each with its hex value and a lock button so a colour can be kept while the rest are regenerated.
Diagram: where the work happens on a SysFenix page that has no file input at all: the tool arrives as ordinary JavaScript inside the page, works the answer out on your own device and renders it in place, so the upload, queue and server-side record a typical online tool needs never happen
Where the work happens on a SysFenix page that has no file input at all: the tool arrives as ordinary JavaScript inside the page, works the answer out on your own device and renders it in place, so the upload, queue and server-side record a typical online tool needs never happen.

Frequently asked questions

How many distinct hues does each harmony mode actually produce?

Fewer than five in two of the four modes, because their five swatches are laid over a fixed offset pattern. Complementary alternates between a base hue and its opposite, giving two hues across the row. Triadic cycles three positions 120 degrees apart, so the fourth swatch repeats the first hue and the fifth repeats the second. Analogous is the only base-hue mode with five separate hues, stepped 30 degrees apart. Random also gives five, since every swatch there draws its own independent hue.

I picked a different harmony mode and nothing on screen changed.

That is expected. The dropdown only records which rule the next generation will follow; it does not touch the swatches already displayed. Press the regenerate button or tap the spacebar and the row rebuilds under the new rule. It works this way so switching modes cannot destroy a palette you were partway through assembling.

Why do the unlocked swatches ignore the color I locked?

Because a regeneration rolls a brand new base hue and derives the fresh swatches from that, then puts your locked ones back in their original positions untouched. The lock preserves the color, not the relationship. In the harmony modes that means a locked swatch is quite likely to sit outside the triad or complement the new swatches belong to, so treat locking as a way of banking a color you like rather than as a constraint on the generator.

How saturated and how light are the generated colors allowed to be?

Every swatch draws its saturation independently between 55 and 75 percent and its lightness between 40 and 70 percent, whichever harmony mode is selected. Those bounds keep the row away from washed-out pastels at one end and near-black or neon at the other, and they are what stop a harmony-based palette from looking like five copies of the same shade. The consequence is that you will never roll a very dark or a very pale color here.

What exactly does the downloaded PNG contain?

An 800 by 200 pixel strip saved as color-palette.png, with the five colors as equal, gapless vertical columns of 160 pixels each. Column boundaries are rounded from the running total rather than each column being rounded on its own, so the strip always tiles the full width with no seam or overlap. There is no text, no hex labels and no padding in the image, just the flat colors.

Will my palette still be here when I come back tomorrow?

No. There is no account, no server and no local storage anywhere in this widget; the palette exists only as state in the open tab and a reload starts over with a fresh random row. Copy the hex list or the CSS block, or download the strip, before you navigate away. If the copy button cannot reach your clipboard it says so on screen, and you can select the values from the swatches and copy them by hand.

Related tools