Hex to RGB Converter
Convert a hex color code into its RGB values
Accepts 6-digit (#FF8800), no-hash (FF8800), or 3-digit shorthand (#F80).
RGB Value
Red (R)
Green (G)
Blue (B)
Conversion Steps
About Hex to RGB Conversion
A hex color code is a six-digit hexadecimal representation of a color, often prefixed with a hash symbol. Each pair of digits represents one of the three color channels: red, green, and blue. Converting it to RGB simply means turning each hexadecimal pair into a decimal number between 0 and 255.
How the Conversion Works
- Strip the hash: Remove the leading # if present
- Expand shorthand: A 3-digit code like F80 becomes FF8800
- Split into pairs: The six digits form three pairs (RR GG BB)
- Convert each pair: Read each pair as a base-16 number
Example
The hex code #FF8800 converts to rgb(255, 136, 0): FF is 255, 88 is 136, and 00 is 0. The shorthand #F80 expands to the same value.
Common Uses
- Translate design tools' hex output into CSS rgb() values
- Work with RGB-based color libraries and APIs
- Adjust individual color channels precisely
- Verify color accuracy across formats
Related Calculators
Note: This converter handles standard 6-digit and 3-digit shorthand hex color codes. Alpha channel (8-digit) hex codes are not supported. Results assume the standard sRGB color space.