Random color generator

A random color is already waiting — press Space for the next one, copy HEX, RGB or HSL with one click.

How to use it

  1. A color is already on screen when the page opens — the first result needs no click.
  2. Press Space (or “Generate”) for the next color. Pick a style first if you want a different kind of random: “Balanced” stays in the usable middle of the space, “Anywhere” rolls the whole HSL space, “Vivid” and “Pastel” aim at accents and soft backgrounds.
  3. Copy HEX, RGB or HSL with its button — or click the big swatch to copy HEX. “Copy all three” puts every format on the clipboard, one per line.

Example

Settings

Style “Balanced”

One possible result

HEX #A5B3C0
RGB rgb(165, 179, 192)
HSL hsl(210, 18%, 70%)

Values are random, so you will never get exactly these — check the shape instead: HEX is # plus six hex digits, RGB is three integers 0–255, HSL is a hue in degrees plus two percentages. The Aa badges on the swatch show how black and white text read on the color (WCAG contrast; 21:1 is best, 1:1 invisible).

Scope, limits and common questions

  • Opaque colors only: no alpha and no 8-digit HEX. For transparency, paste the value into the color converter.
  • Three formats: HEX, RGB and HSL. HSV, CMYK and other color spaces are the color converter’s job.
  • “Balanced”, “Vivid” and “Pastel” are hand-picked usable ranges in HSL — deliberately not a mathematically uniform pick. Choose “Anywhere” for a uniform roll over the whole HSL space; muddy grays and near-whites are part of that deal.
  • Randomness comes from your browser’s crypto.getRandomValues — cryptographically strong, but not an atmospheric-noise “true random” service.
  • The recent-colors strip lives only in this visit: reloading clears it. Nothing is uploaded, stored or put into the URL, and the share button shares the page link only.
  • The Aa badges compare the color against black text and white text only (WCAG 2.x relative luminance). Other text colors, overlays and color management are out of scope.
  • Rounding is display-level: converting the same color between HEX and HSL can shift a channel by 1.

What people usually need next, once the color is in hand.