Random Color Generator

Generate random colors with hex, RGB and HSL values — one colour for a design spark, or a small random palette. Every channel is a cryptographic draw.

Loading calculator…

What this tool does

Generate random colors with hex, RGB and HSL values — one colour for a design spark, or a small random palette. Every channel is a cryptographic draw. sRGB color space, the web standard. Random colors are uniform over the RGB cube, which means muddy mid-tones are common — that is what true uniformity looks like.

How to use the Random Color Generator

  1. Enter or select colors to generate.
  2. Read the calculated result; change any measurement to compare alternatives.

Formula

Each color draws its red, green and blue channels independently and uniformly from 0–255 (crypto.getRandomValues), giving one of 16,777,216 RGB colors; hex and HSL are exact conversions of those channels.
count
Colors to generate

sRGB color space, the web standard. Random colors are uniform over the RGB cube, which means muddy mid-tones are common — that is what true uniformity looks like.

Worked example

Sample color: one draw might produce hex #3FA7D6 — rgb(63, 167, 214), a sky blue, hsl(199, 62%, 54%). Ask for five colors and you get a five-swatch random palette in one go; every draw had the same 1-in-16,777,216 chance as any other exact color.

Inputs

  • Colors to generate1

Result

  • Random resultA fresh cryptographic result is generated locally in the calculator above.

Results explained

Color (hex)
Color (hex) from the formula above. sRGB color space, the web standard. Random colors are uniform over the RGB cube, which means muddy mid-tones are common — that is what true uniformity looks like.
RGB
RGB from the formula above. sRGB color space, the web standard. Random colors are uniform over the RGB cube, which means muddy mid-tones are common — that is what true uniformity looks like.
HSL
HSL from the formula above. sRGB color space, the web standard. Random colors are uniform over the RGB cube, which means muddy mid-tones are common — that is what true uniformity looks like.

Frequently asked questions

16,777,216 — the full 24-bit RGB space (256 × 256 × 256). Each channel is drawn uniformly from 0–255 with cryptographic randomness.

Uniform draws over the RGB cube land most often in the middle of the space, where channels are similar and saturation is low. Vivid colors live near the cube's corners, which are a small share of the volume. Generate a palette of five and keep the one vivid swatch — that is the normal design workflow with random color.

Three notations for the same color: hex (#3FA7D6) is the CSS shorthand, RGB lists the red/green/blue channels 0–255, and HSL lists hue (0–360°), saturation and lightness as percentages. All three outputs here describe the identical color.

Yes — copy the results and paste the hex code into any design tool or stylesheet. Hex is the most widely accepted format across Figma, CSS and presentation software.

This tool generates independent colors, not harmony rules (complementary, analogous, triadic). Use it for raw material — a starting swatch — then adjust hue and lightness around the keeper in your design tool.