Convert HEX to RGB

Turn a HEX color code into its red, green and blue values, and see exactly how the conversion works.

Free, no sign-upRuns in your browserWorks on any device
Preset: HEX input ready, example #4A6CED. You can change any setting.Open the full tool →
HEX
RGB
HSL
CMYK
HSV
๐Ÿ“– Color Format Grimoire
HEX#RRGGBB โ€” Web standard, 6-digit hex
RGBrgb(0-255,0-255,0-255) โ€” Digital display
HSLhue(0-360ยฐ) saturation(0-100%) lightness(0-100%)
CMYKCyan, Magenta, Yellow, Key (0-100%) โ€” Print magic
HSVHue, Saturation, Value โ€” Intuitive color model
โœจ How to use
Edit any field โ€” HEX, RGB, HSL, CMYK, or HSV. All other formats update instantly. Click copy to capture any color code. Let the alchemy flow.
โšก Precision conversion ยท No data leaves your realm
๐ŸŒˆ RECENT CONVERSIONS
No recent colors yet. Convert or randomize to track history.

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 formatrgb(R, G, B), each value 0 to 255
Colors possible16,777,216 (256 ร— 256 ร— 256), in both formats
Used inHEX: 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.

  1. 4A = 4 ร— 16 + 10 = 74
  2. 6C = 6 ร— 16 + 12 = 108
  3. ED = 14 ร— 16 + 13 = 237

So #4A6CED = rgb(74, 108, 237).

ColorHEXRGB
White#FFFFFFrgb(255, 255, 255)
Black#000000rgb(0, 0, 0)
Red#FF0000rgb(255, 0, 0)
Lime#00FF00rgb(0, 255, 0)
Blue#0000FFrgb(0, 0, 255)
Orange#FFA500rgb(255, 165, 0)
Gray#808080rgb(128, 128, 128)
Navy#000080rgb(0, 0, 128)

How to convert HEX to RGB

  1. Type or paste a HEX code, with or without the #.
  2. The RGB value appears next to it immediately.
  3. Copy the format you need with the copy button.
  4. 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.

Related image tools

View all →