Random Color Generator
Generate one or many random colors at once in HEX, RGB, and HSL. Lock the colors you like, regenerate the rest, and copy any color or the whole batch — all in your browser.
Generate truly random colors with this free random color generator. Create a single random color or a whole batch at once, see each one as a live swatch with its HEX, RGB, and HSL values, lock the colors you want to keep, and regenerate the rest until the set feels right. Copy any single color or the entire list in one click — everything is generated privately in your browser using your device's secure randomness.
What is a random color generator?
A random color generator picks colors at random from the full range of digital colors and shows them to you in usable formats. Each color is built from random red, green, and blue values and then converted to HEX, RGB, and HSL so you can paste it straight into CSS, a design tool, or any project. It's a fast way to find a starting color, fill a palette with fresh ideas, or grab a quick background or accent without thinking about color theory.
How to generate random colors
Pick how many colors you want, choose the format you prefer, and generate. Lock the ones you like and regenerate to keep exploring.
- Set how many colors to generate (from 1 to 50).
- Choose your output format: HEX, RGB, or HSL.
- Click Generate colors to create a fresh set of random swatches.
- Tap the lock icon on any color you want to keep, then generate again to replace only the unlocked ones.
- Click Copy on a single swatch, or Copy all to grab the whole list.
HEX, RGB, and HSL formats
Every generated color is available in three formats. HEX (like #3fa9f5) is the most common in web design and CSS. RGB (like rgb(63, 169, 245)) describes the color by its red, green, and blue channels, which is handy for canvas and image work. HSL (like hsl(204, 90%, 60%)) describes the color by hue, saturation, and lightness, which makes it easy to nudge a color brighter or more muted. Switch the format selector to instantly see every color rewritten in your chosen notation.
Why use this random color generator?
- Generate a single random color or up to 50 at once.
- See every color in HEX, RGB, and HSL and switch formats instantly.
- Lock the colors you like and regenerate only the rest.
- Copy any individual color or the whole batch with one click.
- Uses your browser's cryptographically secure randomness for unbiased colors.
- 100% free and private — colors are generated in your browser and never uploaded.
Frequently asked questions
How does the random color generator pick colors?
It generates random red, green, and blue values using your browser's built-in cryptographically secure random number generator (crypto.getRandomValues), then converts each color to HEX, RGB, and HSL. Because every channel is chosen independently across its full range, the colors are evenly spread and unbiased.
What does locking a color do?
Locking keeps a color fixed when you generate again. Tap the lock icon on any swatch you like, then click Generate colors and only the unlocked swatches change. It's the easiest way to keep the colors that work while replacing the ones that don't.
Can I generate many random colors at once?
Yes. Set the count to anything from 1 to 50 and the tool produces that many random colors in a single click, each shown as a swatch with its HEX, RGB, and HSL values.
How do I copy a color?
Click the Copy button under any swatch to copy that single color in the selected format, or click Copy all to copy the entire list at once. The copied value matches whichever format — HEX, RGB, or HSL — you have selected.
Are the generated colors sent anywhere?
No. Every color is generated locally in your browser with JavaScript and nothing is uploaded to a server, so the tool works offline and is safe for private design work.