HEX and RGB โ the same colour, two notations
A HEX code like #2196F3 is simply the red, green and blue values written in hexadecimal: 21 (33) red, 96 (150) green, F3 (243) blue. CSS accepts both formats, and design tools move between them freely โ the converter at the top of Color World handles CMYK as well.
Frequently asked questions
Which format should I use in CSS?
Either โ HEX is shorter and most common for single colours; rgb() is handy when you need an alpha (transparency) channel via rgba().
Why do these colours look different in print?
RGB colours are made of light and many sit outside the CMYK gamut, so they convert duller. Use the CMYK values shown as a starting point and proof before printing.
Are web colours free to use?
Yes โ colour values themselves are not copyrighted. Named brand palettes belong to their owners, but the codes here are standard references.