About the HEX to RGB Converter
The HEX to RGB Converter turns a hexadecimal colour code into its red, green and blue values from 0 to 255, written as CSS rgb(). It accepts 6-digit codes like #5B8DEF and 3-digit shorthand like #FFF, with or without the #.
How to use the HEX to RGB Converter
- Enter the HEX code.
- Copy the rgb() value.
Example
How it works
Each pair of hex digits is one channel: 5B = 91, 8D = 141, EF = 239, so #5B8DEF = rgb(91, 141, 239).
Frequently asked questions
How does 3-digit shorthand work?
Each digit is doubled: #F80 means #FF8800.
What about 8-digit hex with transparency?
The last two digits are alpha. Use rgba() if you need the transparency in CSS.
Is HEX case-sensitive?
No. #5b8def and #5B8DEF are the same colour.