Go back

What is a hex code?

Hex codes are numbers in base 16 and are used to represent colors on the web (and many other places)!

You can represent up to 16,777,216 unique colors with a simple 6 digit hex code!

How do hex codes work?

Colors are represented using RGB (Red, Green, Blue) values. In a hex code, there are 3 pairs of digits. Each pair represents a particular amount of red, green or blue (in that order only!)

#RRGGBB


Each pair can range from 00 to FF, representing 256 unique color values. The higher the value, the more of that color will be "mixed" in. Here are some common hex codes:


Color Hex code
Black #000000
White #ffffff
Red #ff0000
Green #00ff00
Blue #0000ff

Read more about hex here