HEX to RGB converter
Type a hex code to get its RGB values, or type RGB values to get the hex code. Both fields stay in sync.
Need print values? Try the HEX to CMYK converter.
How to use it
- Type or paste a hex code such as #F5B700 (the # is optional, and 3-digit codes like #FB0 work).
- Or type RGB values such as 245, 183, 0 in the RGB field.
- Click any value on the right to copy it. The page address updates, so you can share the result.
How it works
A hex code is three pairs of base-16 digits: red, green and blue. Each pair runs from 00 to FF, which is 0 to 255 in decimal. So #F5B700 is red F5 (245), green B7 (183) and blue 00 (0).
Eight-digit hex codes add a fourth pair for transparency; this converter ignores it and shows the color itself.
Related tools
Questions
What is the RGB value of #FFFFFF?
#FFFFFF is rgb(255, 255, 255), which is white. #000000 is rgb(0, 0, 0), which is black.
Is hex the same as RGB?
Yes, they describe the same color. Hex writes each red, green and blue value as two base-16 digits; RGB writes them as numbers from 0 to 255.
Why does a 3-digit hex code work?
It's shorthand: each digit is doubled, so #FB0 means #FFBB00.