All tools

HEX to RGB Converter

Convert a HEX color code into RGB values.

RGBrgb(59, 130, 246)
HSLhsl(217, 91%, 60%)
R59
G130
B246
Preview

Convert HEX to RGB

HEX and RGB are two ways of writing the same color. HEX (e.g. #3b82f6) is compact and common in CSS and design tools, while RGB (e.g. rgb(59, 130, 246)) expresses each channel as a 0–255 value and is required when you need an alpha channel via rgba().

How HEX maps to RGB

A 6-digit HEX code is just three pairs of hexadecimal digits — red, green, and blue. Each pair (00–ff) equals a 0–255 decimal value, so #ff0000 is rgb(255, 0, 0).

Shorthand HEX

Three-digit HEX like #f00 expands by doubling each digit (#ff0000). This tool accepts 3-, 6-, and 8-digit HEX (the last two digits being alpha, which is dropped for RGB).

Private & Processed Locally

The conversion runs entirely in your browser — nothing is uploaded.

Frequently Asked Questions

Common questions about the HEX to RGB.

How does HEX map to RGB?
Each pair of hex digits (00-ff) equals a 0-255 channel value, so #ff0000 is rgb(255, 0, 0).
Does it accept shorthand HEX?
Yes, 3-, 6-, and 8-digit HEX are all accepted.
Is it private?
Yes, conversion runs in your browser.

More Color Tools

View all tools →
Color PickerColor Palette GeneratorColor Contrast CheckerRGB to HEXHEX to HSLHSL to HEXColor BlenderImage Color Extractor
File Transfer