In short: hex = #RRGGBB — six hex digits for red, green, blue. Pick colors free →

Reading a hex code: #RRGGBB

Split the six digits into three pairs, each a hexadecimal value from 00 (0) to FF (255):

CodeRGBColor
#FF000025500Pure red
#00FF0002550Pure green
#0000FF00255Pure blue
#FF57332558751Warm orange-red
#000000 / #FFFFFF0 / 2550 / 2550 / 255Black / White

Mixing the three channels at 256 levels each yields 16.7 million possible colors (256³) — more than the human eye distinguishes on screen.

The 3-digit shorthand

When both digits in each pair match, you can write just three: #F53 expands to #FF5533, #FFF to white, #000 to black. Browsers handle the expansion automatically — it's pure convenience for stylesheets.

Hex with transparency

Modern CSS also accepts 8-digit hex (#RRGGBBAA), where the final pair sets opacity: #FF000080 is red at roughly 50% transparency. For older-browser support, rgba() remains the safer spelling.

❓ Hex Code FAQs

What is a hex color code?

A six-digit hexadecimal number (#RRGGBB) specifying a color's red, green and blue components — the standard color notation in web design.

How do you read a hex code?

Split into three pairs (RR GG BB), each 00–FF (0–255). #FF0000 is pure red; #000000 black; #FFFFFF white.

What is the 3-digit shorthand?

#F53 means #FF5533 — when each pair's digits match, three digits suffice. Browsers expand it automatically.

What about 8-digit hex?

The extra AA pair sets transparency: #FF000080 is red at ~50% opacity. Supported in modern browsers.

Related: What Is a QR Code? · What Is Base64? · Free Color Picker

Colors render slightly differently across screens — always check brand colors on real devices before finalizing.