Hex to RGB converter
To convert #2563EBto RGB, split it into the pairs 25, 63 and EB and read each as a base 16 number: 2 × 16 + 5 = 37, 6 × 16 + 3 = 99 and 14 × 16 + 11 = 235. So #2563EB is rgb(37, 99, 235), and the converter below does the same for any hex code or a whole list at once.
Select any swatch to convert it.
Results appear here as a table, one row per color.
Turning a hex code into RGB
Hex and RGB are two ways of writing the same thing. A hex color such as #2563EB packs three color channels into six characters. The first pair, 25, is the red channel. The middle pair, 63, is green. The last pair, EB, is blue. Each pair is a base 16 number from 00 to FF, which maps cleanly onto the 0 to 255 range that RGB uses.
To convert by hand you multiply the first digit of a pair by 16 and add the second. So EB is (14 times 16) plus 11, which is 235. HueKit does this for all three channels at once and shows you the finished rgb(37, 99, 235) string, ready to paste into CSS.
When to reach for RGB, and when not to
RGB is the native language of screens. Every pixel is lit by red, green and blue subpixels, so RGB values map directly to hardware. It is the right format when you are working with canvas, WebGL, or any code that blends colors mathematically, because adding and averaging channels behaves predictably.
Hex is just a compact way to write the same RGB values, which is why it dominates in CSS and design handoffs. If you want to adjust lightness or shift a hue, though, neither format is comfortable. That is where HSL earns its place. You can jump to it from the readout above or in the full color converter.
A quick reference
- #000000 is rgb(0, 0, 0), pure black.
- #FFFFFF is rgb(255, 255, 255), pure white.
- #FF0000 is rgb(255, 0, 0), full red.
- #808080 is rgb(128, 128, 128), mid grey.
A worked example
Starting from #2563EB:
- Drop the hash and split the six digits into three pairs: 25, 63, EB
- Red: 25 = (2 x 16) + 5 = 37
- Green: 63 = (6 x 16) + 3 = 99
- Blue: EB = (14 x 16) + 11 = 235
Result: rgb(37, 99, 235)
Exact in both directions. Hex and RGB are the same numbers in different bases, so nothing is rounded or assumed.
Frequently asked questions
How do I convert a hex color to RGB?
Paste your hex value (like #2563EB) into the field. HueKit reads the three pairs of hex digits, converts each pair from base 16 to a number between 0 and 255, and shows the result as an rgb() value you can copy.
What does a hex color code actually mean?
A six digit hex code is three bytes: two digits for red, two for green, two for blue. Each pair ranges from 00 to FF, which is 0 to 255 in decimal. That is exactly what RGB uses, so the two formats describe the same color.
Can I convert a 3 digit shorthand hex?
Yes. Shorthand like #0af expands to #00aaff by doubling each digit. HueKit handles both the 3 and 6 digit forms.
Can I convert several hex codes at once?
Yes. Paste a list into Convert a list under the converter, one code per line or separated by commas or spaces. Every valid code gets its rgb() value in a table, entries that are not hex codes are listed as skipped, and one button copies all the results in order.
Can I pick a color from my screen?
In Chrome and Edge on desktop, Pick from screen opens the browser's eyedropper so you can sample any pixel, including other windows, and convert it straight away. Browsers without the eyedropper simply do not show the button; the color picker and the hex field work everywhere.
Is my color data uploaded anywhere?
No. Every conversion runs in your browser with JavaScript. Nothing is sent to a server, so it works offline once the page has loaded.
Related tools
Last updated by FusionStudios. Every value on this page is computed by the same functions the tools use. How this is calculated.