Color Tools

Random Color Generator

Random colours, ready to copy.

  • Runs in your browser
  • Free, no signup
Copy as

Colours come from crypto.getRandomValues() where the browser provides it. Nothing is stored, and reloading gives a new set.

Click a swatch to copy its HEX value.

Your colours are converted in this browser. Nothing is uploaded and nothing is saved.

Generate a set of random colours and copy them in the shape you need: a plain list of HEX values, a block of CSS custom properties, or a JavaScript array. Useful for placeholder data, for testing how an interface holds up against arbitrary colours, or for breaking out of a palette you have been staring at.

The colours come from the browser’s random number generator rather than a predictable counter, so two visits do not produce the same sequence.

How to use this tool

  1. Choose how many colours you need, up to twenty-four.
  2. Press Generate colours for a new set.
  3. Click any swatch to copy that single HEX value.
  4. Switch the copy format to CSS custom properties or a JavaScript array, then copy the list.

Where the randomness comes from

Values are drawn from crypto.getRandomValues() where the browser provides it, falling back to Math.random() only where it does not. For colours, either is fine — nothing here is a secret — but using the better source costs nothing and avoids the question.

What random colours are actually good for

They are a fast way to test an interface against inputs you would not have chosen: a card with an avatar on an unexpected background, a chart legend, or a table where every row is a different colour. They are also useful for placeholder content that should look obviously provisional rather than like a design decision.

  • Placeholder colours while a real palette is being agreed
  • Checking that a layout survives contrast you did not design for
  • Chart series and legend samples
  • Test data where a value must be valid but not meaningful

Three ways to take the list

A plain list is one HEX value per line. The CSS option produces custom properties on :root, numbered in order. The JavaScript option produces an array of strings, ready to paste into a fixture or a test.

Frequently asked questions

Are the colours truly random?

They are drawn from the browser’s cryptographic random number generator, one full byte per channel, so every one of the 16.7 million colours is equally likely.

Can I get colours that go together?

Not from this page — random colours do not form a palette. Use the palette generator for related colours, or use a random colour as a base there and let it derive the rest.

Can I copy the list as CSS?

Yes. Switch the copy format to CSS custom properties and the list becomes a :root block you can paste straight into a stylesheet.

Are any generated colours stored?

No. They exist only in this page, and reloading produces a new set. Nothing is written to the server or to your device.