CalcaTools

Hex to RGB Converter | Convert Hex to RGB/RGBA with Live Preview

Convert hex color codes to RGB and RGBA instantly with a live color preview, plus the reverse direction. The designer and developer essential for matching colors between design tools and code.

Last updated: June 2026 · Free · No sign-up required

#
1.00
CSS RGB
rgb(0, 0, 0)
CSS RGBA
rgba(0, 0, 0, 1)

Quick reference

HEXRGB
#FFFFFF255, 255, 255
#0000000, 0, 0
#3B82F659, 130, 246
#22C55E34, 197, 94
#7F00FF127, 0, 255

info Hex to RGB Converter

Free color tools calculator — enter your numbers and get an instant, accurate result.

info Private by design

Everything runs locally in your browser. No uploads, no accounts, no tracking.

info Works everywhere

Fully responsive and mobile-friendly — calculate on any device, any time.

info Educational

Includes the formula and step-by-step explanation so you understand the math, not just the answer.

Interpretation guide

Hex digitDecimal
0–90–9
A10
B / C / D11 / 12 / 13
E / F14 / 15

lightbulb Worked example

Let's say you are using the Hex to RGB Converter. A free tool for developers and designers to convert Hexadecimal color codes to RGB/RGBA formats instantly. Features a live color preview and click-to-copy values. Enter the values that match your situation into the input fields and press calculate — using realistic numbers makes the result directly useful for you.

Result: The calculator instantly applies the formula Channel = first hex digit x 16 + second hex digit; e.g. B2 = 11 x 16 + 2 = 178 and returns the result with appropriate precision.

What this means: Read the result in the context of what you are measuring. The step-by-step breakdown lets you confirm the math and understand which input most affects the outcome.

Formula & methodology

Formula: Channel = first hex digit x 16 + second hex digit; e.g. B2 = 11 x 16 + 2 = 178

The Hex to RGB Converter is built on a well-established calculation method. It uses the formula Channel = first hex digit x 16 + second hex digit; e.g. B2 = 11 x 16 + 2 = 178 to turn your inputs into a reliable result. A free tool for developers and designers to convert Hexadecimal color codes to RGB/RGBA formats instantly. Features a live color preview and click-to-copy values. The steps are shown on the page so you can follow the reasoning from input to output.

How HEX converts to RGB

A HEX color is three base-16 pairs — red, green, blue. Convert each pair to a 0-255 decimal: multiply the first digit by 16 and add the second.

Example: #3B82F6

  • Red 3B = 3 x 16 + 11 = 59
  • Green 82 = 8 x 16 + 2 = 130
  • Blue F6 = 15 x 16 + 6 = 246

So #3B82F6 = rgb(59, 130, 246). To reverse it, convert each 0-255 value to two hex digits (e.g. 130 → 82) and concatenate with a leading #.

Authoritative source: W3Schools Colors

Frequently asked questions

How do you convert HEX to RGB?
Split the hex code into three pairs (red, green, blue) and convert each pair from base 16 to decimal: multiply the first digit by 16 and add the second. For #3B82F6, red 3B = 59, green 82 = 130, blue F6 = 246, giving rgb(59, 130, 246).
What is #FFFFFF in RGB?
#FFFFFF is rgb(255, 255, 255) — pure white. Each pair of hex digits converts with Channel = first hex digit × 16 + second hex digit: FF = 15 × 16 + 15 = 255 for red, green, and blue. At the other extreme, #000000 is black, rgb(0, 0, 0). The converter shows the RGB values plus a live preview for any hex you enter.
How do I convert a 3-digit HEX code?
A shorthand 3-digit hex like #F0A expands by doubling each digit: #F0A becomes #FF00AA. Then convert normally: FF = 255, 00 = 0, AA = 170, giving rgb(255, 0, 170). The short form only works when each channel's two digits are identical.
How do you convert RGB back to HEX?
Convert each 0-255 value to a two-digit hex number and join them with a leading #. Divide the value by 16 for the first digit and take the remainder for the second (using A-F for 10-15). For rgb(34, 197, 94): 34 = 22, 197 = C5, 94 = 5E, so the hex is #22C55E.
Why are there letters in HEX color codes?
HEX codes are base 16, which needs sixteen single-character digits. After 0-9, the letters A through F stand for the values 10 through 15. This lets each color channel (0-255) fit in exactly two characters, keeping codes compact — FF for 255, for instance, instead of a longer decimal.
What does the Hex to RGB Converter do?
A free tool for developers and designers to convert Hexadecimal color codes to RGB/RGBA formats instantly. Features a live color preview and click-to-copy values. The calculator takes your inputs, applies the standard calculation, and returns a clear result so you can make an informed decision without doing the math by hand.
What formula does the Hex to RGB Converter use?
The Hex to RGB Converter applies the standard formula: Channel = first hex digit x 16 + second hex digit; e.g. B2 = 11 x 16 + 2 = 178. The tool walks through each step of the calculation so you can verify the numbers yourself.
Is the Hex to RGB Converter free and private?
Yes — the Hex to RGB Converter. There is no sign-up, no paywall, no trial, and no limit on how many calculations you can run. CalcaTools covers its costs with non-intrusive display advertising, so the calculator itself never asks for payment or restricts any feature.
How accurate is the Hex to RGB Converter?
The Hex to RGB Converter applies the standard formula: Channel = first hex digit x 16 + second hex digit; e.g. B2 = 11 x 16 + 2 = 178. It is tested against published worked examples before launch and uses native double-precision arithmetic, so results are accurate to typical precision for the values you enter — with no intermediate rounding that could distort the answer.

Explore the full unit converter toolkit

Every CalcaTools converter — length, volume, weight, time and date, number notation, science and energy, plus file, text and colour utilities — each with instant results and worked explanations.