RandomWiz

Random Hex Color Generator

Press the button to get a random hex color code, with its name and its RGB, HSL and CMYK values. Click a code to copy it.

Tap the code to copy

Tints and shades

Recent colors

Color codes

Text contrast (WCAG)

What is a hex color code?

A hex code describes a color on screen using three pairs of hexadecimal digits, written as #RRGGBB. The pairs set the amount of red, green and blue, and each runs from 00 (none) to FF (full). That gives 16,777,216 possible colors.

Hexadecimal counts from 0 to 9 and then A to F, so FF equals 255 in everyday numbers. Letters can be upper or lower case.

Common hex colors

ColorHexRGB
White#FFFFFF255, 255, 255
Black#0000000, 0, 0
Red#FF0000255, 0, 0
Lime green#00FF000, 255, 0
Blue#0000FF0, 0, 255
Yellow#FFFF00255, 255, 0
Middle gray#808080128, 128, 128

Using a random hex code

Paste the code straight into CSS, for example color: #3366CC;, or into design tools such as Figma, Canva and Photoshop. A short code such as #F00 is the same as #FF0000.

Before you use a color for text, look at the contrast result to see whether it can be read on white or black. Developers can also use random colors to tell chart lines, test data or placeholder blocks apart. For several colors that work together, use the random color palette generator.

More from the Random Color Generator

Try these free tools next

Frequently asked questions

Can I limit the colors to a certain shade?

Yes. Use the mood menu for types such as pastel or neon, and the hue menu for a color family such as blue.

How do I copy the hex code?

Press the code and it is copied to your clipboard.

How do I convert hex to RGB?

Split the code into three pairs and convert each from base 16. This tool shows the RGB, HSL and CMYK values for you.

How many hex colors are there?

There are 16,777,216 six-digit hex colors.