#️⃣ HEX to RGB Converter
A HEX code is RGB in base-16: #1d87f1 converts to rgb(29, 135, 241) — paste any code and read the channels.
How the hex to rgb converter works
Each pair of HEX digits is one channel in base-16: the first pair red, the second green, the third blue. #1d87f1 → 1d = 29, 87 = 135, f1 = 241 → rgb(29, 135, 241). Three-digit shorthand doubles each digit (#fa0 = #ffaa00).
You need this conversion any time CSS or a design tool wants numeric channels — rgba() with transparency being the everyday case: take the RGB values and add your alpha, e.g. rgba(29, 135, 241, 0.5).
Frequently asked questions
How do I convert HEX to RGB manually?
Split the six digits into three pairs and convert each from base-16: multiply the first digit by 16 and add the second (letters a–f are 10–15). f1 = 15×16 + 1 = 241.
How do I get rgba() transparency from a HEX code?
Convert to RGB here, then add the alpha: #1d87f1 at 50% = rgba(29, 135, 241, 0.5). (Modern CSS also accepts 8-digit HEX, where the last pair is alpha: #1d87f180.)
What if my code has only 3 digits?
It is shorthand — each digit doubles. #09c = #0099cc = rgb(0, 153, 204). The tool handles both.
Are HEX and RGB ever different colors?
Never — they are two notations for identical values. Any difference you see comes from color profiles or display settings, not the notation.
Does the tool upload my values?
No — conversion is local and instant.