Random Color Generator

  • Every byte pattern tested: all 16,777,216 colors equally likely
  • Checked by Wayne Bickerton
  • Sources: W3C
  • Updated November 11, 2026

A random color generator picks colors for you by chance: for a design that needs a fresh idea, a craft or art prompt, a game, or a quick test color. Each color comes with its hex code (like #2563EB) and its red, green and blue (RGB) values, ready to copy.

Your colors
5 colors First: #2563EB

5 random colors, each one of 16,777,216.

  • #2563EB rgb(37, 99, 235)
  • #16A34A rgb(22, 163, 74)
  • #F59E0B rgb(245, 158, 11)
  • #DC2626 rgb(220, 38, 38)
  • #7C3AED rgb(124, 58, 237)
Possible colors 16,777,216
Chance of each color 1 in 16,777,216
Colors drawn 5

How a random color is picked

A hex color code is three numbers from 0 to 255, for red, green and blue light, each written as two hexadecimal digits (00 to FF). That makes 256 × 256 × 256 colors. This page takes three random bytes from your browser’s cryptographic random generator, one for each, so every color is exactly equally likely:

Hex code = # + three random bytes (red, green, blue) in hex

Here it is with your numbers:

  1. Possible colors = 256 × 256 × 256
  2. Possible colors = 16,777,216
  3. First color’s bytes (red, green, blue) = 37, 99, 235
  4. Hex code = #2563EB

It means #2563EB had the same 1 in 16,777,216 chance as every other color.

Because every color is equally likely, most picks are in-between shades rather than the bright, named colors people usually think of. Nothing is left out or nudged towards “nice” colors.

Source W3C · CSS Color Module Level 4, §5.2 The RGB hexadecimal notations ↗W3C · Web Cryptography Level 2, the Crypto interface ↗

Random color generator examples

FAQs

What are random colors?

Colors picked by chance instead of chosen. Here every one of the 16,777,216 colors a 6-digit hex code can name is equally likely, so you get pale, dark and muddy colors as often as bright ones.

Source W3C · CSS Color Module Level 4, §5.2 The RGB hexadecimal notations ↗

What color is 999999?

#999999 is rgb(153, 153, 153), a medium gray. Red, green and blue are all equal, as in CSS’s own gray (#808080), and 153 is 60% of the way from 0 to 255, so it is lighter than that gray.

Source W3C · CSS Color Module Level 4, §6.1 Named colors ↗

Can you give me 7 random colors?

Yes: set How many colors to 7. Each of the 7 is drawn on its own from all 16,777,216 colors, by your browser’s cryptographic random generator.

Source W3C · Web Cryptography Level 2, the Crypto interface ↗

Sources

Related calculators