HEX to RGBA Converter
8-digit HEX
#3B82F6FF
RGBA:
Alpha: ()
On the web, alpha goes last: #RRGGBBAA. The checkerboard shows how see-through the result is.
Convert HEX to RGBA free. Add opacity to any HEX color and get the 8-digit HEX and rgba() code instantly, with a checkerboard preview of transparency.
What is the RGBA value of this HEX color?
The RGBA value of #3B82F6 at 50% opacity is rgba(59, 130, 246, 0.5), which is also written as the 8-digit HEX code #3B82F680. The first six digits are the color itself and the last two digits, 80, are the opacity: 50% of 255 is 127.5, which rounds to 128, and 128 in hex is 80. The rgba() form says the same thing with a decimal alpha instead.
RGBA adds one thing to RGB — the A, for alpha, which is how see-through the color is. At 100% opacity the color is solid and the background behind it is hidden; at 0% it is invisible and only the background shows.
Checkerboard preview — your color, live
·
Opacity:
Drag the opacity slider in the tool above and watch the checkerboard show through.
The opacity table — every quarter, in HEX and alpha
Opacity in HEX runs from FF at 100% down to 00 at 0%, with 75% = BF, 50% = 80, and 25% = 40 in between. Each step is the percentage of 255, rounded to the nearest whole number and written in hex: 75% of 255 is 191.25, which rounds to 191, or BF; 25% of 255 is 63.75, which rounds to 64, or 40. The matching decimal alphas are 1, 0.75, 0.5, 0.25, and 0.
This table is the fastest way to read an 8-digit HEX code: the last two digits tell you the opacity at a glance, and the common quarters are worth memorizing because they appear in real stylesheets constantly — 50% for overlays, 25% for soft tints, 75% for mostly-solid panels.
Opacity table — your color, live (tap a row to set the slider)
| Opacity | HEX pair | Alpha | Swatch | |
|---|---|---|---|---|
| 100% | FF | 1 | ||
| 75% | BF | 0.75 | ||
| 50% | 80 | 0.5 | ||
| 25% | 40 | 0.25 | ||
| 0% | 00 | 0 |
8-digit HEX for your color:
How to read an 8-digit HEX code
Read an 8-digit HEX code as color first, opacity last: #RRGGBBAA means red, green, blue, then alpha. In #3B82F680, 3B is red (59), 82 is green (130), F6 is blue (246), and 80 is the alpha (128 out of 255, or 50%). The first six digits are the ordinary 6-digit HEX code, and the last two are the only new part.
Beware the one trap: some platforms write alpha first, as #AARRGGBB — Android and Flutter do this. On the web, in CSS, alpha goes last. If a color pasted from an Android design looks wrong here, check whether its first two digits are actually the alpha.
8-digit HEX decoder — your color, live
Red
Green
Blue
Alpha
Warning: this code looks like alpha-first order (#AARRGGBB) — on the web, alpha goes last.
On the web, alpha goes last: #RRGGBBAA. Android and Flutter put it first.
When should you use RGBA instead of HEX?
Use RGBA instead of HEX whenever the color must be see-through — overlays, shadows, hover states, and text on images. A solid HEX color hides everything behind it, while an RGBA color at 50% lets the background show through halfway, which is how modal overlays dim a page without hiding it and how soft shadows get their depth.
The rule is simple: if the color sits on top of something else and that something should still show, use RGBA. If the color is a flat background or a solid text color, plain HEX is simpler and clearer.
Overlay demo — your color over a picture
A photo-style card underneath
Drag the opacity slider in the tool above: the overlay fades from hiding the picture to barely tinting it.
Opacity vs a lighter color — they are not the same
Opacity is not the same as a lighter color: lowering opacity lets the background show through, while lightening the color just makes a paler solid. A 50% blue over a white page looks pale blue, but the same 50% blue over a dark photo looks dark and muted — because the background is part of the result. A lighter solid blue looks the same wherever it sits.
That difference decides which tool to reach for: use opacity when the background matters and should show through, and use a lighter shade (from the Shades Generator) when you want a fixed pale color that looks the same on any background.
See-through vs solid — your color at 50%
50% opacity
Changes with the background
Lightened solid
Same on any background
RGBA and HSLA — the same idea, two notations
RGBA and HSLA are the same idea in two notations: both add an alpha to a color, one to RGB and one to HSL. The color #3B82F6 at 50% opacity is rgba(59, 130, 246, 0.5) and hsla(217, 91%, 60%, 0.5) at the same time — same color, same see-through amount, different way of writing the color part. The alpha means the same thing in both.
Use RGBA when the rest of your code is RGB, and HSLA when the rest is HSL, so the file stays consistent. The Color Converter page shows both forms for any color, and this page's quick-set buttons work identically for either notation.
Twin cards — your color at the chosen opacity
RGBA
HSLA
Worked example: #3B82F6 at 50% opacity
#3B82F6 at 50% opacity is #3B82F680, or rgba(59, 130, 246, 0.5). The color part is unchanged: 3B = 59 red, 82 = 130 green, F6 = 246 blue. The opacity part is 50% of 255, which is 127.5, rounded to 128, and 128 in hex is 80 — so the 8-digit code is the 6-digit code plus 80. The decimal alpha is 50% written as 0.5.
At 75% the same color would be #3B82F6BF, or rgba(59, 130, 246, 0.75), and at 25% it would be #3B82F640, or rgba(59, 130, 246, 0.25). The color never changes in these examples — only the last two digits and the alpha do.
Opacity ladder — your color at every quarter
100%
75%
50%
25%
0%
The 50% step is the worked example: #3B82F680.
All color tools
21 tools, one topic — see About Hex Color Code Picker for who built this site.
- Color Picker from ImageUpload an image, click a pixel, and read its HEX code.
- Screen EyedropperSample any pixel on your screen.
- RGB to HEX ConverterTurn three RGB numbers into one HEX code.
- HEX to RGB ConverterTurn a HEX code into three RGB numbers.
- HEX to HSL ConverterTurn a HEX code into hue, saturation, and lightness.
- HSL to HEX ConverterTurn HSL values back into a HEX code.
- HEX to HSV ConverterTurn a HEX code into hue, saturation, and value.
- HEX to CMYK ConverterTurn a HEX code into approximate print values.
- RGB to HSL ConverterTurn RGB numbers into hue, saturation, and lightness.
- HEX to OKLCH ConverterTurn a HEX code into the modern OKLCH format.
- Color ConverterSee one color in every format at once.
- HEX to RGBA ConverterTurn a HEX code into RGB with transparency.
- Color Name to HEXLook up any of the 148 CSS named colors.
- Color Palette GeneratorBuild a five-color palette from one color.
- Shades GeneratorBuild 10 tints and 10 shades from one color.
- Gradient GeneratorBuild a linear or radial gradient and copy the CSS.
- Contrast CheckerCheck any text and background pair for AA and AAA.
- Color MixerMix two colors and see the result.
- Random Color GeneratorPick a random color from all 16,777,216 HEX colors.
- Color Blindness SimulatorSee your colors as color-blind users see them.
- Color ChartThe 148 named colors with HEX, RGB, and HSL.
No tool matches your search.
Frequently asked questions
Type the HEX code, set the opacity with the slider, and read off the 8-digit HEX and the rgba() value. For #3B82F6 at 50% opacity the answers are #3B82F680 and rgba(59, 130, 246, 0.5). The checkerboard preview shows exactly how see-through the result is.
80 at the end of an 8-digit HEX code means 50% opacity. The last two digits are the alpha as a byte from 00 (invisible) to FF (solid): 80 is 128 out of 255, which is 50%. The full table is 100% = FF, 75% = BF, 50% = 80, 25% = 40, 0% = 00.
RGBA and 8-digit HEX say the same thing in different forms: rgba() uses a decimal alpha from 0 to 1, while 8-digit HEX uses a hex pair from 00 to FF. #3B82F680 and rgba(59, 130, 246, 0.5) are the same color at the same opacity. Use whichever form your code already uses.
Because a see-through color mixes with whatever is behind it, so the same RGBA value looks different over white, dark, or photo backgrounds. That is the point of transparency — the background is part of the result. If you need a color that looks identical everywhere, use a solid HEX color instead.
On the web, alpha goes last: #RRGGBBAA. Android and Flutter put it first (#AARRGGBB), which is the one common trap when copying a color between platforms. This tool uses the web order, and it warns you if a pasted code looks like alpha-first order.
Yes — paste the full #RRGGBBAA code and the tool splits it into the color and the opacity automatically. The slider jumps to the pasted opacity and the rgba() value appears beside it, so you can go from an 8-digit code to a readable RGBA value in one paste.