What is Random Color Generator?

Generate random colors with their HEX, RGB, and HSL values. Lock colors you like, regenerate the rest, and copy any color code with one click.

Hit the spacebar (or click generate) and the page swaps in a fresh row of random colours, each shown with its name, HEX, RGB, and HSL value. Drag the slider to make the palette anything from a single accent up to eight swatches. Switch the Style picker to Pastel, Vibrant, Dark or Earth to bias the randomness toward a mood, or pick a Harmony rule (complementary, analogous, triadic, tetradic) so the colours relate through colour theory instead of standing alone. Lock the ones you like with the padlock icon and reroll the rest. Every code is one click to clipboard, and the whole palette downloads as a plain-text file or a ready-to-share PNG image. Need code? One tap copies the whole set as a :root block of CSS custom properties, and another copies a link that reopens this exact palette anywhere you paste it. Tap any swatch's tints-and-shades strip to grab five lighter and five darker steps for hover states, borders, and tinted backgrounds.

How to use

  1. Set how many colors you want (anywhere from 1 to 8, 5 by default), then click generate to fill the palette.
  2. Lock any colors you want to keep, then regenerate to fill the remaining slots.
  3. Click any color code (HEX, RGB, or HSL) to copy it to your clipboard.

When to use

  • Breaking creative block when staring at a blank Figma file with no colour direction in mind.
  • Choosing a hue family for a side project, brainstorm doc, or kid's art activity where any vibe will do.
  • Picking a hex for a one-off graphic — banner, social tile, lock screen — without combing through colour-of-the-year lists.

Result

A web designer needs accent colors for a new project. They generate palettes until they find #E8674A (warm coral), lock it, and keep generating to find complementary colors.

FAQ

How is the colour actually chosen?
In the default Random + Any mode each channel (red, green, blue) gets a fresh integer from 0 to 255, so any of roughly 16.7 million RGB triplets can come up — true uniform randomness with no curated bias. When you pick a Style (Pastel, Vibrant, Dark, Earth) the tool randomises hue, saturation and lightness inside that mood's range instead. Harmony modes pick one random base and derive the rest from colour-theory offsets on the wheel.
Why do my random palettes sometimes look muddy?
Pure uniform random in RGB favours mid-greys and dull mid-tones because most of the cube sits in that zone. The fastest fix is to switch the Style picker from Any to Vibrant or Pastel — the tool then samples inside a curated hue/saturation/lightness range so the muddy middle never comes up. You can also lock the punchier hits and reroll the rest a few times until the row holds together.
Can I keep a colour I love while regenerating others?
Yes. Click the padlock on any swatch to lock it, then hit generate. Locked swatches stay put; the others reroll. This is the fastest way to anchor a base colour and explore accents around it.
What's the difference between HEX, RGB, and HSL?
HEX (#1A2B3C) is the same RGB written in compact base-16, useful in CSS and design tools. RGB (rgb(26,43,60)) names the three channels in decimal. HSL (hsl(210,40%,17%)) describes hue, saturation, and lightness, and is easier to nudge intuitively.
Is the result truly random or seeded?
It uses the JavaScript Math.random function in your tab. The output is pseudo-random — practically indistinguishable from random for design purposes, but not cryptographically secure. Refresh the page and you'll get a brand new palette each time.

Related Tools