Skip to main content
Calctrove Calctrove

Hex Color Generator

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)
Flow
  • 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.
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