Skip to content

HEX to RGB Converter: Decode Any Color Code

Convert HEX color codes to RGB values instantly.

Last updated

A hexadecimal colour code converting to three separate red, green, and blue channel bars showing individual values.#2563EBHEXR37G99B235RGB
Every HEX code maps directly to red, green, and blue channel values.
#
r37
g99
b235

About this conversion

HEX color codes are the standard way to specify color on the web. A six-digit hexadecimal string like #FF5733 encodes red, green, and blue channels in pairs of two hex digits (00–FF). Shorthand three-digit codes like #F53 expand to #FF5533 by doubling each digit.

RGB notation, on the other hand, expresses the same information as three decimal integers from 0 to 255. Many design tools, animation libraries, and CSS functions like rgb() require decimal values rather than a hex string, making HEX-to-RGB conversion an everyday task for front-end developers and designers.

This tool accepts both three-digit and six-digit hex codes, with or without the leading hash. It validates the input in real time and shows you the exact R, G, and B values along with a live color preview, so you can paste a code from any source and immediately get usable numbers. If you have a color in an image rather than a hex code, the Color Picker from Image can extract the HEX value for you first.

Diagram breaking down a 6-digit hex code into its RR, GG, BB pairs with arrows showing how each pair maps to an 0-255 RGB value.HEX Colour Code Structure#2563EBRed channel2537(0–255)Green channel6399(0–255)Blue channelEB235(0–255)Each hex pair is a base-16 number: 00 = 0, FF = 255
Each hex pair is a base-16 number from 00 (0) to FF (255), encoding one colour channel.

Related content

Was this page helpful?

Color conversions are mathematical approximations. For critical color work, verify against physical swatch books and printed proofs. See our methodology and full disclaimer.

Frequently Asked Questions

What does HEX stand for in color codes?

HEX stands for hexadecimal, a base-16 number system that uses digits 0–9 and letters A–F. In color codes, each pair of hex digits represents the intensity of one color channel (red, green, or blue) on a scale from 00 (0) to FF (255).

Does this tool accept 3-digit HEX codes?

Yes. A 3-digit code like #F36 is automatically expanded to #FF3366 by doubling each digit. The tool accepts codes with or without the leading # symbol.

Why would I need RGB values instead of HEX?

Many design tools, animation libraries, and CSS functions like rgb() require decimal RGB values. Some APIs and programming languages also work with separate R, G, B integers rather than a single hex string.