The math, in one line
A hex color is three bytes written in base 16: two digits for red, two for green, two for blue, each covering 0 to 255. Converting to RGB is just reading those pairs in base 10. #1DB954 splits into 1D, B9, 54, which is 29, 185, 84.
Common values
| HEX | RGB | Color |
|---|---|---|
| #FFFFFF | 255, 255, 255 | White |
| #000000 | 0, 0, 0 | Black |
| #FF0000 | 255, 0, 0 | Red |
| #00FF00 | 0, 255, 0 | Green |
| #0000FF | 0, 0, 255 | Blue |
| #3B82F6 | 59, 130, 246 | Tailwind blue-500 |
| #1DB954 | 29, 185, 84 | Spotify green |
Going to print instead?
Hex and RGB both describe light on a screen. Ink needs CMYK, and the conversion is not arithmetic: it depends on paper and press. Use the HEX to CMYK converter, which runs a real ICC profile engine, rather than a formula.
