01 / Moods
Even lightness
Pastel, vivid, dark and the rest are picked in OKLCH, so a pastel set really looks equally soft, not random.
Free tool
Press the button for random colours, one or up to twelve at a time, each with its HEX, RGB and HSL code to copy. Pick any colour or a mood, pastel, vivid, dark, light, warm, cool or greys, lock the ones you like and roll the rest until the set works. Copy them as CSS variables or save a PNG strip for your mood board.
Need a custom tool, app or website? Contact us →Press Space for new colours. Click a code to copy it. Lock a colour to keep it.
Colours are made in your browser.
How it works
01 / Moods
Pastel, vivid, dark and the rest are picked in OKLCH, so a pastel set really looks equally soft, not random.
02 / Lock
Lock the colours you like and every roll changes only the others, the quickest way to build a palette.
03 / Codes
Every colour shows its codes for CSS, design tools and code, one click to copy each.
Guide
A random color generator picks colours for you by chance, so you can break out of the same few shades you always reach for. This one gives you 1 to 12 colours per roll, each with its HEX, RGB and HSL code, and lets you narrow the chance to a mood like pastel, vivid or warm. Lock the colours you like and keep rolling the rest, then copy the set as CSS or save it as a picture.
rgb() or the hsl() line.Changing the Mood clears every lock and rolls a fresh set, so lock your favourites only after you have picked the mood.
Any colour picks red, green and blue each from 0 to 255 with equal chance, so every one of the 16,777,216 hex colours can come up. That is true randomness, which also means a lot of muddy browns and greys. The moods pick in OKLCH instead, a colour space where lightness matches what the eye sees, so a set feels even.
| Mood | What you get | Good for |
|---|---|---|
| Any colour | Anything at all, fully random | Games, art prompts, tests |
| Pastel | Very light, soft colours | Baby showers, notes apps, calm backgrounds |
| Vivid | Bright, strongly saturated colours | Buttons, charts, posters, sports kits |
| Dark | Deep colours with a little hue | Dark mode backgrounds, text, headers |
| Light | Near white with a faint tint | Page and card backgrounds |
| Warm | Reds, oranges and yellows | Food, autumn themes, friendly brands |
| Cool | Greens, teals, blues and violets | Tech, health, water and winter themes |
| Greys | Neutral greys, never pure black or white | UI neutrals, borders, text shades |
Randomness is a good start, not a finished palette. A simple way to get a set that works together:
Each swatch shows its codes in black or white, chosen by how light the colour is, which gives a first hint of which text colour will read on it. For a proper check, test the pair against the WCAG ratios before you use it for text.
The page address updates with the hex codes of the colours on screen, so Copy link (or copying the address) shares the exact set, and opening it brings the same colours back. How many and the mood are kept in this browser for your next visit. Copy as CSS gives you a block like this, ready to paste into a stylesheet:
:root { --color-1: #7c52ff; --color-2: #ffb347; }
Rename the variables to what they do, like --brand or --accent, once you know each colour's job.
If you need random colours inside your own project, a random whole number from 0 to 16,777,215 written in base 16 is a random hex colour. In JavaScript: '#' + Math.floor(Math.random() * 0x1000000).toString(16).padStart(6, '0'). The padStart matters: without it, small numbers give a code with fewer than six digits.
Want a palette that follows colour theory instead of chance? Try the color palette generator. To check that a text colour is readable on your new background, use the color contrast checker.
Questions
Press New colors or Space. Set How many to 1 for a single colour.
Yes. Show 5 colours, lock the ones you like, and keep rolling the rest.
They keep colours in a range: pastel is light and soft, vivid is bright and saturated, dark is deep, warm leans red to yellow, cool leans green to blue.
Yes. The address bar holds the colours, so copying the page link shares the set.
Press Copy as CSS for a set of custom properties, like --color-1: #7c52ff;.
On Any colour, all 16,777,216 hex colours, since each of red, green and blue can be any of 256 values. The moods pick from a smaller range so the set looks even.
Yes. Each roll uses the browser's secure random number generator, the same kind used for making passwords, so there is no pattern to the results.
It can happen, but on Any colour the chance is tiny. Lock a colour if you want to be sure it stays.
Roll on the Dark mood for text on light backgrounds, or Light for text on dark ones. Then check the pair with a contrast checker before you use it.