Guide / Hex colors
Hex color codes,
properly explained.
A practical guide to reading, using and pairing hexadecimal color on the web.
What is a hex color?
A six-digit hex code describes red, green and blue light using three pairs: #RRGGBB. Each pair runs from 00 to FF, giving 256 levels per channel and 16,777,216 possible colors.
When can hex be shortened?
When both digits in every pair repeat, the code can collapse. #AABBCC becomes #ABC. Simply Hex identifies and copies shorthand automatically when it exists.
Which palette relationship should I use?
Complementary colors create maximum hue contrast. Analogous colors feel cohesive. Triadic schemes add balanced variety, while split-complementary schemes are often easier to control. Every Simply Hex color page calculates all of them.
Accessibility comes first
Color contrast is measured as a ratio from 1:1 to 21:1. WCAG AA generally requires 4.5:1 for normal text and 3:1 for large text. Always test the exact foreground and background together using the contrast checker.
Use hex in CSS
.button {
background: #5B5BEF;
color: #FFFFFF;
}For design systems, prefer named custom properties. Simply Hex can download a CSS token set for any color, including its readable on-color value.