Random Color Generator
Set how many colors you want (1–20), then press Generate. Each swatch lists HEX, RGB, and HSL so you can drop a fresh accent into CSS, Figma, or a mood board without picking by eye.
Click Generate for a random color.
About this tool
Random bytes come from crypto.getRandomValues when available, otherwise Math.random. RGB values convert to a six-digit HEX and to HSL percentages. Unlike a palette tool, colors are independent draws, not hue-stepped from a seed.
How to use
- Open the generator: Load the page with the count field and Generate button.
- Choose a count: Enter 1 for a single color or up to 20 for a batch.
- Generate colors: Click Generate to roll new RGB values and formats.
- Copy the formats: Copy HEX, RGB, or HSL from the result into your design tool.
Common use cases
- Grab a surprise accent color while sketching a landing page.
- Generate five unrelated swatches for a brainstorm collage.
- Fill placeholder brand chips before a real palette is chosen.
- Teach HEX versus RGB versus HSL with freshly rolled examples.
Tips
- Press Generate again for a new draw; nothing updates until you click.
- Count must be a whole number from 1 to 20 or you will see an error.
FAQ
Are colors deterministic?
No. Each click rolls new random RGB values.
Which formats appear?
Every swatch includes HEX, RGB, and HSL lines.
How is this different from a palette generator?
It draws independent random colors, not a related five-color set.
What if count is zero?
The tool rejects counts outside 1–20 with an error.