Home/Calculators/Random & Pickers/Random Color Generator

Random Color Generator

Generate random hex colour codes for design work, palettes and mockups.

random-color-generator
Result
—
In summary: Each colour is built from three random channel values between 0 and 255 and shown as a six-digit hex code such as #3F9AC2, plus its RGB equivalent. There are 16,777,216 possible colours, so repeats are effectively impossible. Press Generate for a new colour.

How random colours are built

A hex colour code packs three numbers into six characters: two hex digits each for red, green and blue, every channel running from 00 to FF (0 to 255 in decimal). The generator picks all three channels at random, so any of the 256 × 256 × 256 = 16,777,216 colours can appear.

The random colour wheel covers the same ground with a different mechanism.

How to use it

Press Generate for a single colour, or raise How many colours to build a whole random palette in one go. Copy the hex code straight into CSS, Figma or a paint tool; the RGB triple is shown next to it for software that wants channel values. Because the draw is completely unconstrained, some pairs will clash — generate a batch and keep the ones that work together. For random letters or labels, see the random letter generator.

A quick trick for a usable palette: generate a batch, keep one colour you like, then discard the codes whose overall brightness is very different from it.

When you need something similar but not identical, the colour palette generator is there.

Randomness and security

Every result on this page is produced in your own browser with JavaScript's built-in Math.random() pseudo-random generator. That is perfectly fine for games, giveaways, classroom picks and decision-making, but it is not cryptographically secure — never use it to generate keys, tokens or anything protecting real money or private data. Nothing you type is uploaded; the page never sends your inputs anywhere.

The colour picker handles the same job in a slightly different way.

Frequently asked questions

What format are the colours in?
Six-digit hex codes such as #3F9AC2, with the matching rgb(r, g, b) values shown alongside.
Can I generate a palette?
Yes. Set how many colours you want, up to 60, and they are all listed together.
Will I ever see the same colour twice?
It is possible but very unlikely — there are over 16.7 million possible values.
Are the colours guaranteed to look good together?
No. Every colour is drawn independently, so treat the output as raw inspiration rather than a curated palette.
Are the colours truly random?
They come from the browser's Math.random(), which is pseudorandom: the values are statistically even but produced by a formula, not a physical process. That is fine for design work, never for keys or tokens.
How this tool works

The formula behind this tool is written out in full in the sections above, so you can check the maths yourself. Every calculator on Calculorium is verified against worked examples with automated tests before it is published, and pages are reviewed as formulas or standards change. Nothing you type is sent anywhere — the calculation runs entirely in your browser. Read how we build and check these tools.

Last updated: October 2, 2026 · Calculations run in your browser. Estimates for information only.