HEX to RGB Converter
Convert hexadecimal color codes to numeric RGB channels, CSS formats, and percentage values.
Run tool
This online HEX to RGB converter transforms hexadecimal color codes into individual red, green, and blue channel values alongside standard CSS color formats. The tool handles standard six-digit hex codes as well as shorthand three-digit codes, automatically expanding shorthand notations like #09c into #0099cc. You can enter values with or without the leading hash mark prefix, as the tool normalizes the input before processing. Once converted, the tool provides the exact numeric intensity for red, green, and blue channels on the standard 0 to 255 scale. It also generates multiple ready-to-use color strings, including uppercase hexadecimal text, comma-separated RGB, space-separated RGB syntax, and percentage-based RGB notation. If an input contains non-hexadecimal characters or has an unsupported character length, the interface alerts you to adjust the code. This makes verifying and adapting web color codes across graphic design and front-end stylesheets straightforward.
Instructions
- Enter a 3-digit or 6-digit hexadecimal color code in the Hex Color field, with or without a leading #.
- Leave the field unchanged if you want to convert the default value #ff0000.
- Click the Run button to compute the RGB channels and formatted color values.
- Copy the individual numeric RGB channels, standard CSS RGB strings, or percentage values from the result area.
Examples
- Converting #3b82f6 outputs red 59, green 130, blue 246, with CSS formats rgb(59, 130, 246) and rgb(23.14%, 50.98%, 96.47%).
- Entering the shorthand code f0c expands to #FF00CC and outputs red 255, green 0, and blue 204.
FAQ
Can I enter hex color codes without the hash (#) symbol?
Yes, the tool accepts hex codes with or without the leading # prefix and normalizes them automatically before converting.
Does the tool support 3-digit shorthand hex codes?
Yes, 3-digit hex codes such as #fff or #09c are accepted and expanded to full 6-digit values.
Are 8-digit hex codes with alpha transparency supported?
No, this tool specifically converts 3-digit or 6-digit hexadecimal values and does not support alpha transparency channels.
What happens if I enter non-hexadecimal characters?
If the input contains invalid characters or has an unsupported length, the tool displays an error message instead of converted color values.