Hex to RGB Converter
Holding a hex colour from a design file and need the decimal values instead? This hex to rgb converter reads a code like #2563EB and breaks it into its red, green and blue channels — 37, 99 and 235 — so you can drop rgb(37, 99, 235) straight into your CSS, canvas code or app settings. Type or paste the code, check the colour preview, and copy the result. Everything happens in your browser; the colour never leaves your device.
Convert Hex to RGB
Enter a hex code and read off the red, green and blue values.
rgb() and rgba() values ready to copy
Accepts 3-digit (#RGB) and 6-digit (#RRGGBB) codes, with or without the leading # in most cases — if a code does not convert, check it uses only 0–9 and A–F.
When a hex code needs to become RGB
The same colour, written the way your next tool expects it.
From design file to code
Brand guides and tools such as Figma hand colours over as hex. Converting a hex code to RGB gives you the channel values your stylesheet functions, canvas drawing or app theme actually ask for.
Check it before you ship it
The colour preview sits beside the numbers, so a mistyped digit shows up as the wrong shade on screen — not as a bug report after the page goes live.
Exact, every time
The conversion is pure base-16 maths with no rounding. 25 always becomes 37, 63 always becomes 99 and EB always becomes 235, so the RGB result is the identical colour, not an approximation.
About this converter
A hex code is RGB in disguise. In a code like #2563EB, the first pair (25) is the red channel, the second (63) is green and the third (EB) is blue, each written in base 16 instead of everyday decimal. Reading each pair as a decimal number — 25 becomes 37, 63 becomes 99, EB becomes 235 — is the whole conversion. This page does that reading for you whenever you need to turn a hex color to rgb for CSS, code or a design handoff.
Working through a palette by hand is slow and easy to mistype, especially with letters in the mix — remember A stands for 10 through to F for 15. The converter handles 6-digit codes and the 3-digit shorthand CSS allows when each pair repeats a digit, and because every channel runs from 00 to FF, the two notations cover exactly the same 16.7 million colours. If you are going the other way, from decimal channels back to a compact code, that is a hex to rgb job in reverse — Fixpio’s RGB to HEX tool covers it.
Frequently asked questions
How hex codes are built, and how the conversion actually works.
How do I convert a hex code to RGB on this page?
Paste or type your code into the Hex colour field — for example #2563EB. The tool splits it into its three pairs, converts each pair to a decimal number, and shows you rgb(37, 99, 235) along with an rgba() version and a preview of the colour, ready to copy into your project.
What is a hex color code?
It is a compact way of writing an RGB colour for the web. After the # symbol, six characters hold three pairs — #RRGGBB — where RR is red, GG is green and BB is blue. Each pair runs from 00 (none of that channel) to FF (the full 255), and the digits can include the letters A to F, which stand for 10 to 15.
What is the difference between HEX and RGB?
Nothing about the colour itself — only the number system used to write it down. Hex writes each channel in base 16 as two characters, so full red is FF; RGB writes the same channel in decimal, so full red is 255. #FF0000 and rgb(255, 0, 0) are the identical red, and converting between them never changes or loses colour information.
How do I convert hex to RGB by hand?
Split the six characters into three pairs, then read each pair as a base-16 number: multiply the first character by 16 and add the second, counting A as 10, B as 11, and so on up to F as 15. For #2563EB: 25 is 2 × 16 + 5 = 37, 63 is 6 × 16 + 3 = 99, and EB is 14 × 16 + 11 = 235 — giving rgb(37, 99, 235).
Can I enter a short code like #25E, and what about transparency?
Yes — 3-digit shorthand is accepted, and each digit is doubled before converting, so #25E is treated as #2255EE. The results include an rgba() line alongside rgb(), which is the form you extend when a design calls for a translucent version of the colour. The page describes 3- and 6-digit input; it does not describe entering an 8-digit code with alpha already in it, so set any transparency in your own CSS after converting.
Are hex codes case-sensitive, and how many colours are there?
No — case makes no difference, so #2563eb, #2563EB and #2563eB are all the same blue, and you can paste a code exactly as your design tool exported it. As for the range: three channels with 256 levels each give 256 × 256 × 256 = 16,777,216 possible colours, and every one of them can be written in either notation.