HEX to RGB Converter

Enter a six-digit HEX color code to get its red, green, and blue channel values. Copy the RGB result for your CSS or design tool.

#6366F1
Click to change color
Red99
Green102
Blue241
Hue239
Saturation84
Lightness67
HSV / HSB
H239°
S59%
V95%
CMYK
C59%
M58%
Y0%
K5%
CIE LAB
L50
A39
B-70
XYZ (D65)
X25.77
Y18.5
Z85.42
CSS Formats
HEX#6366F1
RGBrgb(99, 102, 241)
HSLhsl(239, 84%, 67%)
HWBhwb(239 11% 33%)
Pantone Matches
Closest
Pantone 2685 C
#9D4EDC
Pantone Cool Gray 11
#53565A
Pantone 2592 C
#B83DBA
Quick Copy

How to use this converter

  1. Type your six-digit HEX code into the HEX field at the top (the # is optional).
  2. Read the RGB row, which shows rgb(r, g, b) with each channel from 0 to 255.
  3. Use the copy button next to the RGB row to copy the value.

Worked example

A HEX code is three hexadecimal pairs. #336699 splits into33,66, and99. Converting each pair from hexadecimal to decimal gives red 51, green 102, and blue 153.

#336699→rgb(51, 102, 153)

Limitations to know

  • Only six-digit HEX codes are accepted; expand three-digit shorthand before converting.
  • RGB values are rounded to whole numbers (0 to 255).
  • The output is an sRGB value, not a wide-gamut or display-profiled color.

Frequently asked questions

How do I convert HEX to RGB?
Type the six-digit HEX code (with or without the #) into the HEX field. The RGB row updates to the matching red, green, and blue channel values, which you can copy with the copy button next to the row.
What do the three HEX pairs mean?
A six-digit HEX code is three two-digit hexadecimal pairs. The first pair is red, the second is green, and the third is blue. Each pair ranges from 00 to FF, which is 0 to 255 in decimal.
Can I convert three-digit shorthand HEX?
This converter expects six-digit HEX codes. Expand a three-digit shorthand by doubling each digit first, for example #369 becomes #336699, then enter the six-digit form.
Why might my RGB value look different elsewhere?
Some tools apply gamma or color-space adjustments. This converter reads the HEX code directly into sRGB red, green, and blue channels with no extra adjustment, so the values are the raw 0 to 255 channel values.

Related conversion pages