Hex to RGB converter
Paste a hex code and read it back as RGB, HSL, HSV and CMYK. Drag the channel sliders or use the picker, then copy any value with one click. Everything updates live.
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.
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.
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.