Skip to tool
ecech.
🎨 Design & Color

Free Random Colour Palette Generator You Can Lock and Refine Colour by Colour

Press space for a new palette, lock the ones you like, keep going. Spaced by lightness rather than randomly, so the result is actually usable in an interface.

or press space

Used as an interface

Lightness spacing

Export




  
Advertisement

How the calculation works

Five random colours is not a palette Random hues, same lightness Nothing reads against anything. No background, no text colour, no hierarchy. Spaced by lightness Now the ends are background and text, and the middle is borders, muted text and accents.

How to Use This Tool

Press the button, or the spacebar, and you get five colours. Click the lock on any you want to keep and press again — the locked ones stay, the rest are replaced. That loop is the whole tool, and it works because you almost never choose a palette in one go; you find one colour you like and build outward.

Why the colours are not actually random

Five genuinely random colours are useless. The reason is not aesthetic, it is structural: five random hues at similar lightness have almost no contrast against one another, so none of them can be a background for any of the others. You end up with something that looks like a palette and cannot be built with.

This generator picks hues according to the harmony mode you select, then spaces the five colours deliberately across the lightness range — roughly 95%, 75%, 55%, 35% and 15%. That gives you a light end for backgrounds, a dark end for text, and three usable steps between them for borders, muted text and accents. The number under each swatch is its contrast ratio against white and against black, so you can see immediately which end each colour belongs to.

What each step is for, once the palette is spaced by lightness. 95% page background large areas 75% surfaces, cards subtle separation 55% borders, icons non-text contrast 35% secondary text check 4.5:1 15% body text headings too The two ends do most of the work. If a palette has no light end and no dark end, it cannot carry text at all, however pleasant the colours are next to each other.
Rough guide, not a rule. The point is that a palette needs a range, not five equally weighted colours.

The harmony modes

  • Analogous keeps all five hues within about 60° of each other. Calm and cohesive, and the safest choice for a whole interface.
  • Triadic spaces three hues 120° apart. Lively and higher risk — it needs one hue to dominate and the others to be used sparingly, or it looks like a toy.
  • Monochrome holds one hue and varies only saturation and lightness. It is the easiest way to produce something that looks designed rather than assembled, and it is what most software interfaces actually use once you look closely.
  • Auto mixes the strategies at random, which is the best mode for finding a starting point you would not have chosen deliberately.

The interface preview

The mock beneath the swatches applies the palette to a small card with a heading, body text, a border and a button. This is worth looking at before committing, because a palette that looks lovely as five rectangles can be unreadable as an interface — and the rectangles never show you that.

On contrast

Contrast ratios are shown per swatch, but a passing ratio is a floor rather than a target. Text at exactly 4.5:1 is legible and tiring; body copy is more comfortable nearer 7:1. If your palette's darkest colour only reaches 4.5:1 against your lightest, consider pushing the ends further apart rather than accepting it.

Advertisement

Frequently Asked Questions

Why aren't the colours completely random?
Because five random colours cannot be used as a palette. Random hues at similar lightness have almost no contrast against one another, so none can serve as a background for any other. This generator spaces the five colours across the lightness range, giving you a light end for backgrounds, a dark end for text, and usable steps in between.
How does locking work?
Click the lock icon on any swatch to keep it. Pressing the button or the spacebar regenerates only the unlocked colours, and the new ones are chosen to work with what you locked rather than independently. This is how palettes are usually built in practice — one colour you are sure about, then everything else around it.
What do the two numbers under each swatch mean?
Contrast ratios against white and against black. They tell you at a glance whether a colour can carry white text, dark text, or neither. A ratio of 4.5:1 is the WCAG AA minimum for body text and 3:1 is the minimum for large text and interface components.
Which harmony mode should I use for a website?
Analogous or monochrome for anything you want to look calm and professional. Triadic is striking but needs discipline: one hue has to dominate and the others be used sparingly, or the result looks unserious. Most well-designed software interfaces are closer to monochrome than people expect.
Can I export to Tailwind or CSS variables?
Yes. The export panel produces CSS custom properties, a Tailwind theme extension, a JSON object, an SVG swatch sheet and a plain hex list. All of them are generated in your browser and copied to your clipboard directly.
Is a palette that passes contrast checks automatically accessible?
No. Contrast ratios cover legibility of text against its background, which is one part of accessibility. They say nothing about whether you are using colour alone to convey meaning, whether your focus indicators are visible, or how the palette looks to someone with a colour vision deficiency. Treat a passing ratio as a floor, not a finish line.
Why does my palette look worse in the interface preview than as swatches?
Because swatches are large blocks of flat colour and interfaces are mostly small text on large backgrounds. Colours that sit pleasantly side by side in equal amounts often fail when one becomes a page and another becomes 14px type. That gap is exactly why the preview is there.

Related tools in Design & Color

Browse all Design & Color tools
The person who builds ecech., at the desk where the tools are written.

Made by one person

ecech. is not a content farm. Every tool here is written and checked by hand, one at a time, by someone who wanted the tool to exist and could not find a version that showed its working.

No accounts and no sign-in, and nothing you type reaches a server — every calculation on this page runs inside your browser. The ads are served by Google and do set their own cookies, which is set out in full on the privacy page. More about the site.