Random Color Generator
Generate random colors, any, pastel, vivid or dark, and copy them as HEX, RGB or HSL. Runs entirely in your browser. Nothing is sent to any server.
Your colors will appear here
What is a random color generator?
A random color generator picks colors for you, which is useful when you need test data, placeholders or a fresh starting point. Any color draws red, green and blue independently from the full 16.7 million color range, so results are often muddy. The pastel, vivid and dark styles instead pick a random hue on the color wheel and keep saturation and lightness within a range, so every result has the same character. Randomness comes from the browser's cryptographic generator, and you can copy the colors as HEX, RGB or HSL.
Examples
Generating random colors in code:
const [r, g, b] = crypto.getRandomValues(new Uint8Array(3));
const hex = "#" + [r, g, b].map((v) => v.toString(16).padStart(2, "0")).join("");// a random pastel: any hue, high lightness
const h = Math.floor(Math.random() * 360);
const pastel = `hsl(${h}, 70%, 85%)`;import secrets
hex_color = "#" + secrets.token_hex(3)printf '#%06x\n' $((RANDOM * RANDOM % 16777216))Use Cases
Placeholder and avatar colors
Give default avatars, tags or empty cards a distinct background each, using the pastel or vivid style so they all look consistent.
Test data and mockups
Fill fixtures, seed databases or prototypes with realistic color values in the format your code expects.
Breaking a creative block
Generate a batch and keep the ones you like as a starting point for an illustration, slide deck or brand exploration.
Games and generative art
Pick colors for sprites, particles or generated patterns, then reuse the list in your code.