Skip to content
hexcolorcodepicker.com

Random Color Generator

Generate a random color

Your random color

#8389A2

rgb(131, 137, 162)

hsl(228°, 14%, 57%)

History — your last 12 colors

Click any history swatch to bring that color back as the current color.

Click once for a random color with its HEX, RGB, and HSL codes. Copy it in one tap for free, keep a history of your last colors, or lock one you like.

What is a random color?

A random color is one color picked by chance from all 16,777,216 colors a screen can show. Each of the three RGB channels — red, green, and blue — can take 256 values from 0 to 255, so the total is 256 × 256 × 256 = 16,777,216 possible colors. Every click picks one of them with equal odds.

That number is why random colors feel surprising: the chance of getting the same color twice in a row is 1 in 16,777,216. You will see colors you would never have picked on purpose, which is the whole point — randomness breaks habits and shows new options.

The current random color, large

#09ABB6

rgb(9, 171, 182)

hsl(184°, 91%, 37%)

Click Generate in the tool above and this panel repaints with the new color.

How to use a random color

Click Generate, look at the color, and either copy it or click again. If the color is close to what you want but not quite right, lock it and use the shades generator or the mixer to adjust it — randomness finds the starting point, and the other tools refine it. If it is wrong, one more click costs nothing.

Random colors work best as a starting point, not a finished palette. Generate 5 to 10 colors, keep the 1 or 2 you like from the history strip, and build the rest of the design around those. A design built from 10 unrelated random colors looks noisy.

History strip — your last 12 colors, live

Click any swatch to bring that color back as the current color.

Lock a color you like

The lock keeps a good color on screen while you keep generating. Tap the lock on a color you like, and it stays as the current color even as you click Generate again — the new colors go to the history instead of replacing it. That way a lucky find is never lost to one extra click.

Locking is also how you compare: lock a color, generate a few more, and the history shows the new options next to the locked one. Pick the best of the set, unlock it, and copy its HEX code when you are ready.

Locked swatch

Not locked yet — lock a color in the tool above

#09ABB6

While a color is locked, new colors appear in the history strip beside it instead of replacing it.

Random colors for inspiration, not for decisions

Randomness is a brainstorming tool, not a design decision. A random color can spark an idea — a teal you had not considered, a warm brown for a background — but it does not know your brand, your audience, or your accessibility limits. Always check a random pick before you ship it.

That check has two steps: first, does the color fit the design, and second, does it pass contrast with the text that will sit on it. The contrast checker on this site tests any pair, so paste the random HEX code in there with your text color before you use it.

Random to check — one step, in the right order

1. Random color #09ABB62. WCAG Contrast Checker — test it with your text color

Copy the HEX code from the tool above, paste it into the contrast checker with your text color, and check it against the 4.50:1 AA limit. (The site keeps picker state in the page, not in the URL, so the code travels on your clipboard, not in a link.)

Why 16,777,216 colors?

Screens build color from 3 channels of 8 bits each, and 2 to the power of 24 is 16,777,216. Each channel holds 8 bits, so it has 2^8 = 256 values; three channels together hold 24 bits, so the total is 2^24 = 16,777,216. That figure is called 24-bit color, and it is the standard for screens, photos, and the web.

The HEX code is simply those 3 channels written as 6 hex digits: 2 digits for red, 2 for green, 2 for blue. Each pair runs from 00 to FF, which is 0 to 255 in decimal — the same 256 values per channel, written in base 16.

Three channels, three axes — 256 × 256 × 256

red 0–255green 0–255blue 0–255

256 × 256 × 256 = 16,777,216 — 65,536 × 256, or 2^24.

All color tools

21 tools, one topic — see About Hex Color Code Picker for who built this site.

Frequently asked questions

It can make any of 16,777,216 colors — 256 × 256 × 256. Each RGB channel has 256 values from 0 to 255, so the total is 256 × 256 × 256 = 16,777,216. Every click picks one of them with equal odds.