HEX
A hexadecimal colour stores red, green, and blue channels as pairs of base-16 digits. This compact notation is common in design tokens and stylesheets.
How it works
- The six-digit form is #RRGGBB. Each pair ranges from 00 to ff, corresponding to decimal 0 to 255. Letter case does not change the colour.
- A three-digit value expands each digit: #369 becomes #336699. This shortcut works only when each full pair repeats the same digit.
- Eight-digit notation adds alpha as the final pair, #RRGGBBAA. Be careful when moving values between tools that use a different alpha order.
A practical example
<article class="card"><h1>Garden club</h1><p>Meet, share, and learn together.</p></article>
.card {
color: #142e2c;
background: #fff;
border: 1px solid #0f766e33;
}
The card has dark text and a white background. Its border uses the teal colour with an alpha suffix, making it translucent.