Random Color Generator

Generates a random color with its HEX, RGB and HSL codes; you can limit it to pastel, bright, dark, warm shades or your own hue.

HEX
RGB
HSL
or press space

The color appears the moment the page opens. You get the next one by clicking the button, clicking the swatch itself, or pressing the spacebar. The code is shown next to it in three notations, and each has its own copy button.

Why the color does not come from three random bytes

The simplest approach is to pick three random numbers from 0 to 255, and that is what most generators do. The trouble is that among the 16.7 million combinations, clean and vivid colors are in the minority, while grayish-brown and muddy ones dominate. Clicking the button, you would mostly get dirt.

This tool picks a color differently: the hue is chosen around the circle, while saturation and lightness come from the range defined by the set. So the Vivid set always produces punchy colors, the Pastel set always soft ones, and the same color never appears twice in a row.

Sets

Pastel colors are light and quiet, good for backgrounds and fills. Vivid colors are saturated, good for accents and buttons. Light and Dark sets cap the lightness from above and from below. The Warm set yields red, orange, and yellow hues; the Cool set yields green-cyan, blue, and violet ones.

Your own hue

A hue in HSL is an angle on the color circle from 0 to 360. Zero is red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, and 300 is violet. Set the start and end of an arc, and the color will only fall within it. The arc may cross zero: from 340 to 20 you get pinkish-red hues.

Rate this tool

Help us get better

Other tools