Enter the color
Type or paste a HEX code, or pick a color with the color picker.
Paste any HEX color and get its RGB value instantly, together with every other format: HEX, RGB, HSL, HWB, CMYK and OKLCH. Free, and it runs in your browser.
100% private — the calculation is done in your browser and nothing is sent to any server.
Keep going with your result in another tool. Nothing is uploaded.
Type or paste a HEX code, or pick a color with the color picker.
Every format updates as you type and shows a live preview of the color.
Use the copy button next to the format you need.
To convert HEX to RGB, enter your HEX color in the box above and read the RGB value next to it. For example, #3B82F6 is rgb(59, 130, 246). The result updates as you type, and every other format (HEX, RGB, HSL, CMYK and more) is shown at the same time.
A HEX color is a six-digit hexadecimal code with a # in front: two digits each for red, green and blue, from 00 to FF. In #3B82F6, red is 3B, green is 82 and blue is F6. A three-digit shorthand such as #38F repeats each digit, and eight digits add opacity at the end.
RGB describes a color as amounts of red, green and blue light, each from 0 to 255. rgb(59, 130, 246) is the same color as #3B82F6. CSS also accepts an opacity value, as in rgba(59, 130, 246, 0.5).
Here is the calculation for #3B82F6, step by step:
| Color | HEX | RGB |
|---|---|---|
| Black | #000000 | rgb(0, 0, 0) |
| White | #FFFFFF | rgb(255, 255, 255) |
| Red | #FF0000 | rgb(255, 0, 0) |
| Lime | #00FF00 | rgb(0, 255, 0) |
| Blue | #0000FF | rgb(0, 0, 255) |
| Yellow | #FFFF00 | rgb(255, 255, 0) |
| Cyan | #00FFFF | rgb(0, 255, 255) |
| Magenta | #FF00FF | rgb(255, 0, 255) |
| Gray | #808080 | rgb(128, 128, 128) |
| Orange | #FFA500 | rgb(255, 165, 0) |
| Purple | #800080 | rgb(128, 0, 128) |
| Pink | #FFC0CB | rgb(255, 192, 203) |
| Brown | #A52A2A | rgb(165, 42, 42) |
| Navy | #000080 | rgb(0, 0, 128) |
| Teal | #008080 | rgb(0, 128, 128) |
| Coral | #FF7F50 | rgb(255, 127, 80) |
HEX is the most compact way to write a color in CSS and design tools, so it is the code most people copy and share. RGB is the model screens use and the one CSS functions such as rgba() build on, which makes it handy when you need transparency or want to compute colors in code.
More utilities that also run without leaving your browser.