Developer Tools

HEX to RGB Converter

Live

Calculate rgb from hex color.

About HEX to RGB Converter

Calculate rgb from hex color. Enter hex color in a purpose-built hex to rgb converter interface designed for this subject. Three- or six-digit hexadecimal channels are expanded and converted to decimal RGB and HSL. The result includes rgb, normalized hex, hsl, color channels, supporting detail, and clear units or diagnostics. Results depend on the entered assumptions, units, supported input range, and rounding. Review important decisions against authoritative requirements. Processing stays in your browser, and UtilityPages does not store the values you enter.

Set up HEX to RGB Converter

Workspace

Source workbench

Edit the source fields below and inspect the rendered output alongside your work.

This workspace updates as you edit.

Enter hex color.

HEX to RGB Converter result

Enter the values above, then process to see a detailed result.

How HEX to RGB Converter works

Three- or six-digit hexadecimal channels are expanded and converted to decimal RGB and HSL.

How it works

Three- or six-digit hexadecimal channels are expanded and converted to decimal RGB and HSL. Results depend on the entered assumptions, units, supported input range, and rounding. Review important decisions against authoritative requirements.

Examples

HEX to RGB Converter worked example

Example input
{
    "value": "#1d4ed8"
}
Expected result
{
    "rgb": "rgb(29, 78, 216)",
    "hex": "#1D4ED8",
    "hsl": "hsl(224.278075 76.326531% 48.039216%)",
    "channels": [
        {
            "channel": "Red",
            "value": 29
        },
        {
            "channel": "Green",
            "value": 78
        },
        {
            "channel": "Blue",
            "value": 216
        }
    ]
}

Privacy

This tool does not store your inputs or results on UtilityPages.org.

Citations & sources

  1. Web APIs

Frequently asked questions

How does the HEX to RGB Converter work?

Three- or six-digit hexadecimal channels are expanded and converted to decimal RGB and HSL.

What information should I enter?

Enter hex color. Use values and units from the same scenario so the result is internally consistent.

What results does this tool provide?

It reports rgb, normalized hex, hsl, color channels, including intermediate context where it helps you review the answer.

What limitations should I know about?

Results depend on the entered assumptions, units, supported input range, and rounding. Review important decisions against authoritative requirements.