Color converter

HEX to RGB Converter

Convert a HEX color such as #5B5CF0 into red, green, and blue channel values.

HEX and RGB describe the same digital color using different notation.

What this tool does

HEX and RGB are two notations for the same three sRGB color channels. A six-digit HEX code is written as #RRGGBB, where each two-digit pair stores one channel in base 16.

Enter the values in the calculator above and choose Calculate. The calculation runs in your browser; the inputs are not intentionally sent to a Colormapped application server.

How it works

  1. Remove the leading #. Three-digit shorthand such as #F0A is expanded to #FF00AA before conversion.
  2. Split the six digits into RR, GG, and BB pairs.
  3. Convert each pair from hexadecimal to decimal. Two hex digits cover 00–FF, which maps exactly to 0–255.
  4. Write the three decimal channels as rgb(R, G, B).

Worked example

Input#5B5CF0
Outputrgb(91, 92, 240)

5B in base 16 is 91, 5C is 92, and F0 is 240. No color-space approximation is introduced by changing notation.

When to use it

  • Move a design-token HEX value into Canvas or image code that expects RGB channels.
  • Inspect individual red, green, and blue channel values while debugging CSS.
  • Convert compact brand colors into a format that is easier to manipulate numerically.

Accuracy and limits

  • This tool handles 3- and 6-digit HEX colors, not alpha-bearing 4- or 8-digit HEX.
  • The conversion is exact for the stored sRGB channel values; it does not perform color-profile conversion.

Useful next steps