HEX to RGB Converter
Converts a hex colour code into its RGB equivalent. A hex code is simply three pairs of hexadecimal digits — red, green and blue — each holding a value from 00 to FF, which is 0 to 255 in decimal.
Free, no signupRuns entirely in your browser
Input
Result
rgb(239, 68, 68)
About
What the HEX to RGB Converter does
Once you see that structure, hex codes become readable. #FF0000 is maximum red with no green or blue. #FFFFFF is all three at maximum, which is white. #808080 is all three at half, which is mid grey. RGB notation is what you need when a colour has to be manipulated in code or given an alpha channel.
How it works
Using the HEX to RGB Converter
- 1Pick a colour or enter a hex code.
- 2The code is split into three two-character pairs.
- 3Each pair is read as a hexadecimal number from 00 to FF.
- 4That converts to a decimal value from 0 to 255.
- 5The three values are assembled into rgb() notation.
Use cases
What people use it for
- Adding transparency to a brand colour with rgba()
- Passing a colour into a JavaScript animation
- Matching a colour between a design tool and CSS
- Building a colour value programmatically from components
FAQ
Frequently asked questions
6 related
All tools →