Convert any HEX color code to an RGB value — instantly, 100% local
Paste a HEX color (with or without #) and get the exact RGB values and CSS-ready rgb() string. Supports 3-digit and 6-digit hex codes. No upload, no account, everything runs in your browser.
Need HEX ↔ RGB ↔ HSL ↔ OKLCH all at once?
Open the full Color Converter →A 6-digit HEX color like #3b82f6 encodes three 8-bit values in hexadecimal notation. The first two characters (3b = 59) give the Red channel, the next two (82 = 130) give Green, and the last two (f6 = 246) give Blue. Each channel ranges from 0 (absence) to 255 (full intensity). The resulting RGB triplet maps exactly to the same color — HEX and RGB are two notations for the same sRGB color.
Take each pair of hex digits and convert from base-16 to base-10. For #1a2b3c: 1a→26, 2b→43, 3c→60, giving rgb(26, 43, 60).
A 3-digit hex like #f0a is a shorthand where each digit is doubled: it becomes #ff00aa. This tool expands shorthand automatically.
Yes. The output rgb(R, G, B) is valid CSS that works in all browsers. You can also use it in Tailwind arbitrary values: text-[rgb(59,130,246)].
Not on this satellite page. For alpha channel support or to also convert to HSL and OKLCH, use the full Color Converter.