Random Color Generator
Generate random colors with one click and grab their HEX, RGB and HSL codes, or build a whole random palette. Free, instant and 100% in your browser.
Tip: press the spacebar to generate a new color.
Random palette
Click any palette swatch to copy its HEX code.
How to generate a random color
- Pick a style (optional). Choose Any, Pastel, Vivid, Light, Dark or Grayscale to control the kind of colors you get.
- Hit Generate. Click 🎲 Generate color (or press the spacebar) as many times as you like. Each color comes with its HEX, RGB and HSL codes.
- Copy or build a palette. Copy any code with one click, or generate a palette of 2–20 random colors and copy or download all the HEX codes at once.
About this tool
This random color generator is a quick source of inspiration for designers, artists, developers and anyone stuck on "what color should this be?". Colors are produced with the browser's cryptographically strong random number generator (crypto.getRandomValues), so results are genuinely unpredictable and evenly distributed. The style presets shape the randomness in HSL space: pastels use high lightness with soft saturation, vivid colors use near-full saturation at medium lightness, and light, dark and grayscale work the way you would expect.
Use it to pick placeholder colors while coding, seed a brand-palette brainstorm, choose team colors, or settle a debate with a truly random pick. Everything runs locally in your browser — nothing is sent to a server, there are no limits, and the page keeps working offline once loaded. Prefer picking from real, standardized colors instead? Browse the CSS Color Names reference.
Frequently asked questions
How random are the colors?
The tool uses crypto.getRandomValues, the browser's cryptographically secure random source, rather than the weaker Math.random. In "Any color" mode each of the roughly 16.7 million RGB colors is equally likely.
What do the style presets actually do?
They constrain the random pick in HSL space. Pastel uses saturation 40–70% with lightness 78–90%; Vivid uses saturation 85–100% with lightness 45–60%; Light forces lightness 75–95%; Dark forces lightness 8–30%; Grayscale picks one random level and uses it for all three RGB channels.
Can I generate a whole palette at once?
Yes — set a count from 2 to 20 and click "Generate palette". Click a swatch to copy a single HEX code, use "Copy HEX codes" for the whole list, or download the palette as a plain-text file.
Is there a keyboard shortcut?
Yes. Press the spacebar anywhere on the page (when you are not typing in a field) to instantly generate a new color in the selected style.