Skip to content
Color Codes

Random color

Random Color Generator – Random HEX, RGB & HSL

Generate random colors with HEX, RGB and HSL codes. Choose light, dark, pastel, vivid or neutral styles, roll one color or a whole grid, and copy in one click.

How to use this tool

Need a starting point, a placeholder or a little inspiration? Press Space to roll a new random color. Styles constrain the result in OKLCH, so pastel colors really stay soft and dark colors stay readable behind white text. Every color shows its closest CSS name and all common formats.

  1. 1 Choose a style and how many colors to generate.
  2. 2 Press Space or Generate to roll new colors.
  3. 3 Click a color to copy it or open it in other tools.

Frequently asked questions

Are the colors truly random?

The Any style picks each RGB channel uniformly from 0–255, so all 16.7 million colors are equally likely. The other styles randomize hue, lightness and chroma within a range.

How do I get a random pastel color?

Choose the Pastel style. It keeps OKLCH lightness high and chroma low, which produces soft colors that work well as backgrounds.

Can I see colors I generated before?

Yes. The recently generated list keeps your last 24 colors while the page is open; click any of them to copy it again.

What is the closest CSS name?

The named CSS color that is perceptually nearest to the random color, measured in OKLab. Use it as a memorable label or to find a similar keyword.