Hex Code
A shorthand for RGB values written in hexadecimal, commonly six digits, such as #FF7A59.
See it on the 3D treeGoing deeper
The six digits are three pairs for red, green and blue, each from 00 to FF in base 16, equal to 0 to 255. CSS also allows a three-digit short form, and four or eight digits to include transparency. A bare hex value is normally interpreted as sRGB on the web.
Why it matters
It gives an exact, copyable value for handoff, though it says little about how light or related colours are.
In practice
A developer asks for the button colour and you give the token name along with its current hex value.
Common mistake
Sending a screen hex value to a printer as the colour specification without agreeing a print equivalent.
Connected terms
- Alpha ChannelAn eight-digit hex code adds a transparency value.
- HSLHSL describes screen colours in terms that are easier to adjust.
- RGBA hex code is another way of writing RGB values.
- Design TokensTokens give hex values meaningful names that can change centrally.