HEX and RGB are the same color, written two ways
A HEX code such as #4A6CED is just an RGB color written in base 16. The six characters are three pairs: the first pair is red, the second green and the third blue, each running from 00 (none) to FF (full, or 255). Designers copy HEX codes from tools like Figma, while code, spreadsheets and some apps want the RGB numbers instead.
This page opens the Color Converter with a HEX value already filled in, so the RGB result is on screen straight away. Type or paste any HEX code and the RGB, HSL, HSV and CMYK values update as you type, ready to copy.
The two formats
| HEX format | #RRGGBB, each pair 00 to FF in base 16 |
|---|---|
| RGB format | rgb(R, G, B), each value 0 to 255 |
| Colors possible | 16,777,216 (256 ร 256 ร 256), in both formats |
| Used in | HEX: CSS, design tools, brand guides ยท RGB: CSS, code, Office apps, image editors |
Convert HEX to RGB by hand
Worked example for #4A6CED: split it into three pairs (red, green, blue) and convert each pair from base 16 to base 10. Letters count as A=10, B=11, C=12, D=13, E=14, F=15.
4A= 4 ร 16 + 10 = 746C= 6 ร 16 + 12 = 108ED= 14 ร 16 + 13 = 237
So #4A6CED = rgb(74, 108, 237).
| Color | HEX | RGB |
|---|---|---|
| White | #FFFFFF | rgb(255, 255, 255) |
| Black | #000000 | rgb(0, 0, 0) |
| Red | #FF0000 | rgb(255, 0, 0) |
| Lime | #00FF00 | rgb(0, 255, 0) |
| Blue | #0000FF | rgb(0, 0, 255) |
| Orange | #FFA500 | rgb(255, 165, 0) |
| Gray | #808080 | rgb(128, 128, 128) |
| Navy | #000080 | rgb(0, 0, 128) |
How to convert HEX to RGB
- Type or paste a HEX code, with or without the #.
- The RGB value appears next to it immediately.
- Copy the format you need with the copy button.
- Use the color picker to try nearby shades.
Tips
Reading HEX at a glance
Equal pairs mean gray: #808080 is mid gray. The biggest pair tells you the dominant channel: in #4A6CED the blue pair (ED) is the largest, so the color is a blue.
Adding transparency
CSS also accepts rgba(74, 108, 237, 0.5) for 50% opacity, which is often easier to read than an eight-digit HEX code.
Office and Canva
Word, PowerPoint and Excel ask for RGB numbers in their custom color box, so convert your brand HEX codes here first.
Need different settings? Use the full Color Converter.
Frequently asked questions
Is there any difference between HEX and RGB colors?
No. They describe exactly the same 16.7 million colors. Only the notation differs: base 16 pairs versus three numbers from 0 to 255.
What does the # mean in a HEX code?
It only marks the value as a color code in CSS. The color itself is the six characters after it.
Why does my color look different when printed?
Screens mix light (RGB) and printers mix ink (CMYK). Some bright screen colors cannot be printed exactly, so they come out duller.
Can I convert RGB back to HEX here?
Yes. Type into the RGB field and the HEX value updates the same way.