How to use
- Choose the number of colors (2 to 8) and a harmony rule, then press Generate. The Space key does the same thing.
- Lock a color you like with the lock button in its top right corner. A locked color survives every reroll, and the other slots are refilled around it according to the rule.
- Pick a mood, Balanced, Pastel, Vivid or Deep, to change the saturation and lightness range.
- Use each swatch’s Copy button for its HEX, RGB or HSL value, or copy the whole palette from Export as CSS variables, SCSS variables, JSON or a HEX list.
Harmony rules
A rule decides where on the color wheel (the HSL hue) each slot falls. Each slot is nudged randomly by up to 7 degrees around its position so that slots sharing a family do not look identical.
| Rule | Hue offset per slot | Feel |
|---|---|---|
| No rule | Any value from 0 to 359 degrees per slot | Free, but no promise colors go together |
| Analogous | Neighbors 25 degrees apart (for 5 slots: -50, -25, 0, 25, 50) | Calm and natural |
| Complementary | Alternates 0 and 180 degrees | Strong contrast |
| Triadic | Cycles 0, 120, 240 degrees | Balanced and lively |
| Split complementary | Cycles 0, 150, 210 degrees | Softer than a straight complement |
| Tetradic | Cycles 0, 90, 180, 270 degrees | Rich, best with one color leading |
| Monochrome | One hue, lightness from 20% to 90% in even steps | Shades of a single color |
Using locks
Lock a color with a hue of 200 degrees (#3399cc) in the first slot and generate three slots with the triadic rule: the other two land near 320 and 80 degrees. If you lock the second slot instead, the tool subtracts that slot’s offset to find the base hue, so the remaining slots still sit on the same rule. Increasing the number of colors keeps existing slots and only fills the new ones.
Export example
Exporting the two colors #3366cc and #ff5b1f with the variable name brand gives:
:root {
--brand-1: #3366cc;
--brand-2: #ff5b1f;
}
Choosing SCSS produces lines such as $brand-1: #3366cc;. The variable name is cleaned to lowercase letters, digits and hyphens, and falls back to color when it is empty or does not start with a letter.
Things to keep in mind
- Randomness comes from the browser’s
crypto.getRandomValues, redrawn when needed so no value in a range is favored. There is no seed, so you cannot regenerate the same palette later. Copy combinations you like right away. - Nothing guarantees that a random combination is readable as text on a background. Check pairs with Contrast Checker before using them.
- To start from one color you choose, use Color Palette Generator. For single random colors with no harmony rule, use Random Color Generator. For lightness steps of one color, see Color Shades Generator.
Frequently asked questions
How is this different from the random color generator?
The random color generator draws each color independently. This tool picks hues according to a rule such as complementary or triadic and matches the rest to any locked color, so the results tend to go together.
How do I keep one color and change the others?
Lock that color and press Generate. Its hue becomes the reference and the other slots are redrawn to fit the rule.
Can I use the palette in code directly?
Choose CSS variables under Export to get a :root block you can paste into a stylesheet. SCSS variables and a JSON array work the same way.
Can I get the same palette again?
No seed is stored, so a palette cannot be reproduced later. Copy the export if you need to keep one.
All color math happens in your browser and nothing is sent to a server.