HEX to RGB Converter
A HEX color code packs the red, green, and blue channels into six hexadecimal digits — two per channel, each from 00 to FF. Converting to RGB simply means reading those pairs back out as decimal numbers between 0 and 255.
Paste a HEX value such as #6c72ff below and the equivalent rgb() string appears instantly, ready to copy into CSS, JavaScript, or design tools. Both 3-digit shorthand and 6-digit codes are accepted, and the conversion happens entirely in your browser.
rgb(108, 114, 255)| HEX | Red | Green | Blue |
|---|---|---|---|
#000000 | 0 | 0 | 0 |
#ffffff | 255 | 255 | 255 |
#ff0000 | 255 | 0 | 0 |
#6c72ff | 108 | 114 | 255 |
#1a936f | 26 | 147 | 111 |
#6c72ff→rgb(108, 114, 255)Each hex pair (6c, 72, ff) becomes a decimal channel value.
Frequently asked questions
How do I convert HEX to RGB by hand?
Split the six-digit code into three pairs (RR, GG, BB) and convert each pair from base-16 to base-10. For example FF is 255, 6c is 108. The three results become rgb(R, G, B).
What does a 3-digit HEX code mean?
Shorthand like #abc expands by doubling each digit, so #abc is the same as #aabbcc. This tool expands shorthand automatically before converting.
Is #6c72ff the same color in HEX and RGB?
Yes. #6c72ff and rgb(108, 114, 255) describe the identical color; HEX and RGB are just two notations for the same red/green/blue values.
Does the converter handle alpha or 8-digit HEX?
This tool focuses on the standard 6-digit (and 3-digit) RGB HEX codes. For alpha channels, 8-digit HEX, and HSL/HSV, use the full Color Picker linked below.