← Zaps Colors
Generator

Random Color Generator

Press Generate or the space bar for a random HEX color. You get its RGB and HSL codes and the closest named color.

#FF922E
HEX#FF922E
RGBrgb(255, 146, 46)
HSLhsl(29, 100%, 59%)

How many
Recent colors
Colors you generate appear here.

How the random color generator works

Each press of Generate picks a new color using your browser's secure random number source. With the style set to Any color, red, green and blue are each picked at random from 0 to 255. The other styles pick hue, saturation and lightness inside set ranges, so Pastel stays soft and Dark stays dark instead of landing anywhere in the 16.7 million possible colors.

  1. Choose how many colors you want, 1, 5 or 10, and a style such as Light, Vivid or Blue.
  2. Press Generate or the Space bar. Click a swatch in a batch to see its codes.
  3. Copy the HEX, RGB or HSL value. Earlier colors stay in the recent strip, so you can click one to bring it back.

The address bar updates with ?hex= and the current color, so you can copy the link to share it. Everything runs in your browser, and nothing is uploaded.

What each style does

StyleWhat you get
Any colorUniform random red, green and blue
LightLightness 78 to 92%, so backgrounds and tints
DarkLightness 10 to 26%, so text and dark themes
PastelMedium saturation with lightness 80 to 90%
VividSaturation 88 to 100% at mid lightness
Red, orange, yellow, green, blue, purple, pinkA hue range for that family, with saturation 50 to 95%
NeutralGrays with at most a faint tint, from near black to near white

Found one you like? Run it through the contrast checker before you put text on it, or build matching colors with the color palette generator.

Random color generator FAQ

Are the colors truly random?

They come from crypto.getRandomValues, the random source browsers use for security features, so there is no pattern or seed to repeat. Styles other than Any color are random inside a range, which is why every Pastel result looks soft.

What is a HEX color code?

A HEX code is six base 16 digits after a #. The first pair is red, the second green and the third blue, each from 00 to FF. #FF922E means red 255, green 146 and blue 46. CSS, Figma and most design tools accept it.

How do I pick a random color for a brand?

Use Vivid or a hue family such as Blue and generate 10 at a time. Pick two or three you like, check how white and black text read on them in the contrast checker, then build a palette around the best one. Random is good for finding a starting point, and you still choose the final color.

Can I get a random hex color in one family, like green?

Yes. Set Style to Green, or any of red, orange, yellow, blue, purple, pink or neutral. Each result stays inside that hue range, with varied saturation and lightness.

How do I get the same color back later?

Copy the page address after generating. It ends in ?hex= followed by the six digit code, and opening it shows that color again. Colors in the recent strip are only kept until you close or reload the page.

What is the nearest named color?

It is the entry in the color names library that looks closest to your color, measured in the OKLab color space, which tracks human perception better than raw RGB. Click it to see that color's page.

Related color tools

Put these colors to work

Pick a Zaps template for your next post, story or reel, add your photos and match it to your palette.