Generate a random color

Draw random CSS colours as hex, RGB, or HSL strings.

freeworks offlinenothing uploaded
ToolRandom Color Generator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Each colour obtains three random bytes for red, green, and blue, then optionally converts those channels to RGB or HSL text. Count repeats independent draws from browser crypto randomness.

  • Five hex colours form the initial output.
  • The source is unseeded and not reproducible.

Worked example

Generate 3 Hex Colors
Generate 3 random colors in hex format
Input
											Count: 3
Format: hex
										
Output
												#26640A
#92CC8F
#453123
											

When to use this

Design brainstorms sample accents, test fixtures create CSS colours, and games assign palette entries.

Edge cases

  • Random colours do not guarantee contrast against a background.
  • HSL values derive from random RGB bytes rather than uniform hue sampling.
  • A seeded palette cannot be replayed because no seed is accepted.

References