Skip to main content
Calctrove Calctrove

Hex to RGB Converter

Hex to RGB converter

Convert hex color values into RGB channels.

Inputs

1Live

Value 1

rgb(59, 130, 246)

Channels: R 59, G 130, B 246.

Live update

Color preview

#3b82f6

Value 1

rgb(59, 130, 246)
Formula
R

Symbol legend

Symbol Meaning Unit Copy
H_i Hex digit components base16 digit
R,G,B Red Green Blue channels 0 to 255
  • Normalize hex into six-digit form.
  • Split into RR, GG, and BB byte pairs.
  • Convert each pair from hexadecimal to decimal.
Example

Worked example: #3b82f6

  1. 1 Hex pairs are 3b, 82, f6
  2. 2 Decimal values are 59, 130, 246
  3. 3 RGB string is rgb(59, 130, 246)

#3b82f6 converts to rgb(59, 130, 246).

How
  1. Enter or pick a hex color.
  2. Let converter parse channel bytes.
  3. Read RGB output and copy when needed.
Avoid
  • Using non-hex characters in color string.
  • Forgetting short hex must be expanded.
  • Mixing channel order when reading output.
Checks

Best fit

Hex to RGB Converter is built for convert hex color values like #3b82f6 into rgb channel values. If Hex to RGB Converter does not match the input scope, compare the answer with a second method.

Input check

Check H_i before calculating: it means hex digit components and is measured in base16 digit.

Sanity check

For Hex to RGB Converter, use the worked example as a quick benchmark: #3b82f6 converts to rgb(59, 130, 246). If the hex to rgb converter answer is far away, check whether an input, unit, or mode changed.

Before copying

Review this common issue first: using non-hex characters in color string.

FAQ
Does this support 3-digit hex?

Yes, short form is normalized automatically.

Can I include the hash symbol?

Yes, both with and without hash are accepted.

Is output always 0 to 255?

Yes, each channel is an integer in that range.

Switch
Switch12