Random Color Generator

Generate random colors and copy HEX, RGB and HSL values.

Open tool

Overview

The Random Color Generator rolls a fresh swatch at the press of a button and shows its hex, rgb(), hsl() and OKLCH values ready to copy. Filters let you bias the result toward pastels, vivid, dark or warm/cool ranges, so the output stays useful instead of dumping random noise.

It is handy when prototyping placeholder colours, generating chip backgrounds for a demo, building a quick mood board, or seeding a chart series with non-overlapping hues. Designers also use it as a creative warm-up — looking at unfamiliar swatches can knock you out of a colour rut.

How it works

A random hue is sampled uniformly across the 360° circle, and saturation and lightness are drawn from configurable ranges (defaults to 50–80% saturation and 40–70% lightness, which avoids both neon and mud). The result is generated in HSL and converted to sRGB hex.

For "harmonious" mode, the generator picks a single random hue and then samples additional swatches by applying classical harmony rotations (complementary, analogous, triadic) so the output reads as a coordinated palette rather than disconnected swatches.

Examples

roll 1  → #6f4ca8  (vivid violet)
roll 2  → #e3a06b  (warm pastel)
roll 3  → #2f6b5a  (deep teal)
roll 4  → #f3e7c9  (cream)

FAQ

Why isn't the colour purely random?

Uniform random sampling in RGB produces too many muddy or near-grey colours to be useful. Sampling in HSL with bounded saturation and lightness keeps the output visually interesting.

Can I generate a fully random palette of N colours?

Yes — choose the multi-colour mode and the generator returns N swatches with hue spread to maximise distinctness, optionally constrained to a chosen harmony rule.

Is the output reproducible?

Each roll uses a fresh entropy source, so reloading the page gives different colours. For reproducibility, seed a separate generator (see the hash-to-color tool).

How do I get only pastels or only dark colours?

Use the lightness filter: pastel typically sits in 75–90%, dark in 15–35%. Pair with a moderate saturation cap to avoid washed-out or muddy extremes.

Can I exclude certain hues?

Yes — the hue-range filter restricts the random sample to a continuous arc of the colour wheel, useful when you want only "warm" or only "cool" results.

Try Random Color Generator

An unhandled error has occurred. Reload ×