ColorPickerTools

HEX to RGB Converter

HEX to RGB converter — instant, exact, and copy-ready.

Quick answer: Paste a hex code and get the exact red, green and blue channels, plus HSL and CMYK. Accepts #RGB shorthand and #RRGGBBAA.

HEX input
RGB output
HEX
#3B82F6
RGB
rgb(59, 130, 246)
HSL
hsl(217.2, 91.2%, 59.8%)
CMYK
cmyk(76%, 47%, 0%, 4%)
Core facts
Input#RRGGBB (also #RGB, #RRGGBBAA)
OutputRGB, HSL, CMYK
Privacy100% client-side
CostFree

What is a HEX to RGB Converter?

A hex to RGB converter splits a six-digit hexadecimal code into its red, green and blue channels. The code is not a label to look up — it is the RGB values themselves written in base 16, so #3B82F6 decodes to rgb(59, 130, 246) with no approximation.

Common Uses for HEX to RGB Converter

  • Decode a hex from a stylesheet to see the channel values
  • Get rgb() values for a canvas or WebGL call
  • Check the individual channels before adjusting one of them

How HEX and RGB relate

HEX and RGB describe the same color in different coordinate systems. Converting between them is a matter of arithmetic, not interpretation, so the result is exact: the tool applies the standard formula and shows the value to one decimal place.

Where the rounding happens

Channel values are rounded for display. If you round a value and then convert back, you may land one unit away from the original — that is normal and invisible on screen. Keep the original code when a perfect round-trip matters.

Frequently Asked Questions

How do you convert HEX to RGB?
Split the code into three byte pairs and convert each from base 16 to decimal: #3B82F6 → 3B=59, 82=130, F6=246.
Does it accept shorthand hex?
Yes. #F00 is expanded to #FF0000 before conversion.
What about eight-digit hex with alpha?
The tool reads the six colour digits; the final alpha pair is ignored for the RGB result.

More color converters

More Color Tools