Skip to main content

Random Color Generator

Generate one or many random colors, each shown with its hex, RGB, and HSL values. Optionally lock hue, saturation, or lightness ranges to bias results toward pastel, vivid, or dark palettes.

Input

Hue Range

Saturation Range

Lightness Range

Output

Generated Colors

Your color palette will appear here.

Was this helpful?

Guides

A random color generator is the fastest way to get inspiration, test data, or placeholder swatches without hand-picking values. This tool generates any number of random colors in one click and shows each one as a hex code, an RGB triplet, and an HSL string — three formats covering nearly every place a color needs to be pasted, from CSS to design tools to spreadsheets.

How it works

Click Generate Colors and the tool picks a random hue, saturation, and lightness for each color, then converts that HSL value to RGB and hex. By default it favors saturated, mid-brightness colors (30–100% saturation, 25–75% lightness) so results look intentional rather than muddy or washed out — the same bias a designer would apply by eye.

If you want more control, lock any of the three ranges:

  • Hue range — restrict which part of the color wheel to sample from (e.g. 0–60° for warm reds and oranges, 180–240° for cool blues).
  • Saturation range — lower it (0–30%) for muted, desaturated tones, or push it toward 100% for punchy, vivid color.
  • Lightness range — raise it (70–95%) for soft pastels, or lower it (5–30%) for deep, dark shades.

Combine all three locks to dial in a specific mood — for example, hue 200–260°, saturation 40–70%, lightness 70–90% produces a family of soft, cool-toned pastels well suited to a light UI theme.

How to use

  1. Set Number of Colors (1–20) with the slider.
  2. Optionally check Lock Hue/Saturation/Lightness Range and set min/max bounds for any dimension you want to constrain.
  3. Click Generate Colors.
  4. Read each color's hex, RGB, and HSL value straight from the results table, or copy/download the whole table as a CSV.

Since every click produces a fresh random set, use the lock ranges to make repeated runs land in the same general area (e.g. "always pastel") while still varying the exact colors.

FAQ

Why do unlocked colors avoid very pale or very dark results? Uniformly random saturation and lightness (0–100% on both) produces a lot of near-gray, near-white, or near-black colors that are hard to tell apart. Restricting the unlocked defaults to 30–100% saturation and 25–75% lightness keeps every color visually distinct, matching what most people mean by "a random color."

What's the difference between hex, RGB, and HSL? Hex (#RRGGBB) and RGB (rgb(r, g, b)) describe a color by its red, green, and blue components — the same value in two notations. HSL (hsl(h, s%, l%)) describes it by hue, saturation, and lightness — often more intuitive to reason about and adjust by hand.

Can I get the same set of random colors again later? No — output is intentionally non-deterministic, so re-running the generator, even with identical settings, produces different colors each time. Copy or download results you want to keep.

How many colors can I generate at once? Up to 20 per run. Download the results as CSV to build a larger swatch library across multiple runs.

Privacy

All color generation and conversion happens locally in your browser — nothing is sent to a server.

colorrandomgeneratorhexrgbhslpalette

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.