Random Color Generator

Get a fresh set of random colours with one click, each shown as a swatch with its HEX, RGB and HSL code. Choose the kind of colour you want, from any colour at all to bright, pastel, light, dark or grey shades, and copy a single code, the whole list, or ready-made CSS variables for your stylesheet.

Kind of colour

Generating runs in your browser. What you type never leaves this device.

Features

  • HEX, RGB and HSL codes for every colour

  • Any, bright, pastel, light, dark or grey shades

  • 1 to 24 colours per click

  • Text on each swatch switches between black and white for readability

  • Copy one code, all HEX codes, or CSS custom properties

  • Random values from the browser's secure generator

Ideas for random colours

Design starting points

Stuck on a palette for a poster, logo or slide deck? Generate pastels or darks until something clicks.

Placeholder and chart colours

Quick distinct colours for test UI, avatars or chart series.

Art and craft

A random colour challenge for drawing, rangoli or a classroom activity.

Developers

Paste the CSS variables straight into a theme file to try a scheme.

Reading colour codes

HEX, RGB and HSL

  • HEX: #RRGGBB, red, green and blue as two hex digits each (00 to FF). Used in CSS, Figma, Canva and most design apps.
  • RGB: the same three channels as numbers from 0 to 255.
  • HSL: hue (0 to 359 degrees round the colour wheel), saturation and lightness in percent. Easiest to tweak by hand: raise lightness for a paler shade.

How the shade options work

Any picks red, green and blue values at random, so you will see muddy and neon colours alike. The other options pick a random hue and keep saturation and lightness in a band: pastel is soft and light, bright is fully saturated at middle lightness, dark stays below about 30% lightness, and grey has no saturation at all.

Checking contrast

A random colour may not be readable behind text. Each swatch shows its code in black or white, whichever contrasts better. For text and buttons, check the pair against WCAG contrast guidance before you use it.

Random Color Generator - FAQ