What is a hex color code?
The 6-character code behind every color on your screen, explained simply.
A hex color code is a 6-character code, like #FF5733, that tells a screen exactly which color to show. Designers and developers use them everywhere: in websites, apps, brand guidelines, and design tools.
How a hex code is built
Every hex code starts with a hash (#) followed by six characters. Those six characters are really three pairs, one each for red, green, and blue:
- #FF5733 → FF red, 57 green, 33 blue.
- Each pair runs from 00 (none of that color) to FF (the maximum).
- In everyday numbers, 00 to FF is the same as 0 to 255.
The characters use base 16, also called hexadecimal. That is why you see letters: after 9 you keep counting with A, B, C, D, E, and F, where F stands for 15. Two of those characters together can describe 256 different levels, and three pairs give you more than 16 million possible colors.
Hex codes in the wild
Why designers and developers use hex
Hex is compact, precise, and works the same everywhere. A single code like #4BB8A9 means the exact same color in Figma, in CSS, and in a brand document, with no room for guesswork. That shared shorthand is why hex has been the default way to talk about color on screens for decades. Want to explore a few? Try the random hex color generator.
The five you already know
These show up constantly, and they are worth recognizing on sight:
Common questions
Learn hex the fun way
Hexadle turns hex into a daily puzzle. Guess the color, read the clues, and you will start recognizing codes without even trying. New to it? See how to play.
Download on theApp Store