My Tool Studio
Color

HEX to RGB

A brand guide hands you #E4572E and your CSS needs an rgba() overlay with 85 percent opacity. That's the moment this hex to rgb converter earns its spot in your bookmarks. Paste any hex code into the input and it instantly splits the value into red, green, and blue channels, so #E4572E becomes rgb(228, 87, 46) with zero mental math. The tool reads 3-digit shorthand like #F80, standard 6-digit codes, and 8-digit codes that carry an alpha channel. Front-end developers use it when translating hex color to rgb for opacity work, canvas drawing, or JavaScript color manipulation, and the same panel also hands you HSL, HSV, CMYK, and OKLCH for free.

Always freeNo sign upRuns in your browser
hex#6366F1
rgbrgb(99, 102, 241)
hslhsl(239, 84%, 67%)
hsvhsv(239, 59%, 95%)
cmykcmyk(59%, 58%, 0%, 5%)
oklchoklch(58.54% 0.2 277.12deg)

How to use

01

Paste your hex code

Drop your color into the Input (HEX) field, formatted like #RRGGBB. Shorthand such as #F80 and 8-digit codes with alpha are accepted too, and the field starts with #6366F1 as a sample.

02

Check the live preview

A large color swatch renders directly under the input the moment your code parses. If you see the warning 'Could not parse, check format', fix a typo or a missing digit before copying anything.

03

Copy the RGB row

Six format rows appear below the swatch: HEX, RGB, HSL, HSV, CMYK, and OKLCH. The RGB row is highlighted. Click its copy button to grab the rgb() string for your stylesheet.

Why HEX to RGB

Common questions

How does a 3-digit hex code like #F80 expand to RGB?
Each digit doubles, so #F80 is treated as #FF8800 and converts to rgb(255, 136, 0). The shorthand only exists for codes where every channel repeats its digit, which is why not every color has a 3-digit form.
Does the HEX to RGB tool read 8-digit hex codes with alpha?
Yes. An 8-digit code like #E4572ED9 carries opacity in its last two digits. D9 is 217 in decimal, and 217 divided by 255 is roughly 0.85, so you'd write it as rgba(228, 87, 46, 0.85) in CSS.
What RGB values come out of the sample color #6366F1?
The default input #6366F1 converts to rgb(99, 102, 241). Split the code into pairs: 63 hex is 99, 66 hex is 102, and F1 hex is 241. Each pair is just a base-16 number between 0 and 255.
Can I get HSL or CMYK from the same hex input?
You can. Every valid color you paste is rendered in six formats at once: HEX, RGB, HSL, HSV, CMYK, and OKLCH, each with its own copy button. There's no need to run the value through several tools.
Why does my hex code trigger 'Could not parse, check format'?
The usual culprits are a stray character, five or seven digits instead of three, six, or eight, or letters outside the 0-9 and A-F range. The hash prefix is optional in most cases, but the digit count has to be right.
Is the hex parsing done locally in my browser?
Entirely. The parsing runs client side with the chroma-js library, so your colors never touch a server. You can convert hex to rgb online here even on a locked-down corporate network without sending data anywhere.
What's the arithmetic behind splitting a hex triplet into channels?
Take each two-digit pair and compute first digit times 16 plus second digit. For #E4572E: E4 is 14 times 16 plus 4, which is 228; 57 is 87; 2E is 46. The result is rgb(228, 87, 46).

More Color tools

View all