HEX to RGB Converter
Convert any HEX color code to RGB with live, two-way sliders.
About the HEX to RGB Converter
What is HEX to RGB conversion?
A HEX code like #3B82F6 is just a compact way of writing three numbers: the amount of red, green, and blue in a color. RGB writes those same three values out in decimal, from 0 to 255, as rgb(59, 130, 246). This converter reads your HEX and gives you the RGB instantly, along with HSL, HSB/HSV, and CMYK and a live preview.
RGB is the form many languages, canvas APIs, and design tools expect, and it's the only way to add an alpha channel in some contexts. Type or paste a HEX code, drag the R, G, and B sliders, or grab a color with the eyedropper — everything updates together, right in your browser.
How to Use This Tool
- Enter your color. Type or paste a HEX code, click the swatch to use your system picker, or use the eyedropper.
- Read the RGB value. The matching
rgb()appears at the top of the results and updates live. - Fine-tune. Nudge the Red, Green, and Blue sliders to adjust the color and watch the HEX follow.
- Copy what you need. Grab RGB, HSL, HSB, or CMYK, and explore the shades, tints, and harmonies.
Common Use Cases
- Coding: Many libraries and canvas methods want RGB numbers rather than a HEX string.
- Adding transparency: Convert to RGB to use the
rgb(r g b / a)form with an alpha channel. - Design tools: Enter a web HEX as RGB in apps that expect decimal channels.
- Checking contrast: See how the color scores as text on white and black.
Need the reverse or another model? Use our RGB to HEX converter, the HEX to HSL converter, or browse all our free color tools.
Frequently Asked Questions
How do I convert HEX to RGB?
Split the six-digit HEX into three pairs and read each pair as a hexadecimal number from 0 to 255 — those are your red, green, and blue values. The tool does it instantly, including three-digit shorthand like #F53.
Can I use the RGB value directly in CSS?
Yes. Paste rgb(59, 130, 246) into a stylesheet, or use the space-separated form with alpha, rgb(59 130 246 / 0.5), for opacity.
Is the conversion exact?
Yes — HEX and RGB are two ways of writing the same value, so there's no rounding or loss in either direction.
Is this tool free and private?
Completely. The conversion runs entirely in your browser with JavaScript, so your colors are never uploaded or logged, and it works offline once loaded.