RGBA to HEX
Paste an rgba() color, an 8-digit hex or an Android 0xAARRGGBB value. You get every other form, with the alpha stored as a hex byte, and can lay the color over your own photo or video.
On a checkerboard
Alpha byte 128 (0x80) = 50.2% opaque.
Flattened on white and on black
#FFAB99 and #802C1A: the opaque colors you get once it is drawn.
| CSS 8-digit hex (#RRGGBBAA) | #FF573380 | |
|---|---|---|
| CSS rgba() | rgba(255, 87, 51, 0.5) | |
| CSS rgb() with slash | rgb(255 87 51 / 50%) | |
| Android (#AARRGGBB) | #80FF5733 | |
| Flutter | Color(0x80FF5733) | |
| Opaque hex, no alpha | #FF5733 |
Reading an 8-digit hex
Eight hex digits are four bytes, and the only question is which one is the alpha. CSS Color Module Level 4 puts it last: in #0000FFCC the CC (204, 80%) is the opacity of pure blue. The Android Color class reads #AARRGGBB, so on Android the same digits #0000FFCC would be a fully transparent color. Flutter writes Color(0xAARRGGBB), alpha first as well.
The tool reads a value starting with 0x as alpha-first, since that is how Android and Flutter write it in code. For a plain 8-digit hex it uses the CSS order and offers a switch.
Hex transparency table
The alpha byte for each opacity: 100% is FF, fully opaque; 0% is 00, fully transparent. In CSS it goes after the color (#FF573380), on Android before it (#80FF5733). Each value is the opacity times 255, rounded to the nearest whole number, so 50% is 128 (80), not 127.5.
| Opacity | Hex byte | Decimal |
|---|---|---|
| 100% | FF | 255 |
| 95% | F2 | 242 |
| 90% | E6 | 230 |
| 85% | D9 | 217 |
| 80% | CC | 204 |
| 75% | BF | 191 |
| 70% | B3 | 179 |
| 65% | A6 | 166 |
| 60% | 99 | 153 |
| 55% | 8C | 140 |
| 50% | 80 | 128 |
| 45% | 73 | 115 |
| 40% | 66 | 102 |
| 35% | 59 | 89 |
| 30% | 4D | 77 |
| 25% | 40 | 64 |
| 20% | 33 | 51 |
| 15% | 26 | 38 |
| 10% | 1A | 26 |
| 5% | 0D | 13 |
| 0% | 00 | 0 |
Every percentage from 100 to 0
| Opacity | Hex byte | Decimal |
|---|---|---|
| 100% | FF | 255 |
| 99% | FC | 252 |
| 98% | FA | 250 |
| 97% | F7 | 247 |
| 96% | F5 | 245 |
| 95% | F2 | 242 |
| 94% | F0 | 240 |
| 93% | ED | 237 |
| 92% | EB | 235 |
| 91% | E8 | 232 |
| 90% | E6 | 230 |
| 89% | E3 | 227 |
| 88% | E0 | 224 |
| 87% | DE | 222 |
| 86% | DB | 219 |
| 85% | D9 | 217 |
| 84% | D6 | 214 |
| 83% | D4 | 212 |
| 82% | D1 | 209 |
| 81% | CF | 207 |
| 80% | CC | 204 |
| 79% | C9 | 201 |
| 78% | C7 | 199 |
| 77% | C4 | 196 |
| 76% | C2 | 194 |
| 75% | BF | 191 |
| 74% | BD | 189 |
| 73% | BA | 186 |
| 72% | B8 | 184 |
| 71% | B5 | 181 |
| 70% | B3 | 179 |
| 69% | B0 | 176 |
| 68% | AD | 173 |
| 67% | AB | 171 |
| 66% | A8 | 168 |
| 65% | A6 | 166 |
| 64% | A3 | 163 |
| 63% | A1 | 161 |
| 62% | 9E | 158 |
| 61% | 9C | 156 |
| 60% | 99 | 153 |
| 59% | 96 | 150 |
| 58% | 94 | 148 |
| 57% | 91 | 145 |
| 56% | 8F | 143 |
| 55% | 8C | 140 |
| 54% | 8A | 138 |
| 53% | 87 | 135 |
| 52% | 85 | 133 |
| 51% | 82 | 130 |
| 50% | 80 | 128 |
| 49% | 7D | 125 |
| 48% | 7A | 122 |
| 47% | 78 | 120 |
| 46% | 75 | 117 |
| 45% | 73 | 115 |
| 44% | 70 | 112 |
| 43% | 6E | 110 |
| 42% | 6B | 107 |
| 41% | 69 | 105 |
| 40% | 66 | 102 |
| 39% | 63 | 99 |
| 38% | 61 | 97 |
| 37% | 5E | 94 |
| 36% | 5C | 92 |
| 35% | 59 | 89 |
| 34% | 57 | 87 |
| 33% | 54 | 84 |
| 32% | 52 | 82 |
| 31% | 4F | 79 |
| 30% | 4D | 77 |
| 29% | 4A | 74 |
| 28% | 47 | 71 |
| 27% | 45 | 69 |
| 26% | 42 | 66 |
| 25% | 40 | 64 |
| 24% | 3D | 61 |
| 23% | 3B | 59 |
| 22% | 38 | 56 |
| 21% | 36 | 54 |
| 20% | 33 | 51 |
| 19% | 30 | 48 |
| 18% | 2E | 46 |
| 17% | 2B | 43 |
| 16% | 29 | 41 |
| 15% | 26 | 38 |
| 14% | 24 | 36 |
| 13% | 21 | 33 |
| 12% | 1F | 31 |
| 11% | 1C | 28 |
| 10% | 1A | 26 |
| 9% | 17 | 23 |
| 8% | 14 | 20 |
| 7% | 12 | 18 |
| 6% | 0F | 15 |
| 5% | 0D | 13 |
| 4% | 0A | 10 |
| 3% | 08 | 8 |
| 2% | 05 | 5 |
| 1% | 03 | 3 |
| 0% | 00 | 0 |
RGBA to HEX: questions
- How do I convert rgba to hex?
- Write red, green and blue as two hex digits each (255 → FF, 87 → 57, 51 → 33), then turn the alpha into a byte: multiply by 255 and round. rgba(255, 87, 51, 0.5) gives 0.5 × 255 = 127.5 → 128 → 80, so the hex is #FF573380.
- Can a hex color have transparency?
- Yes. CSS accepts 8-digit hex (#RRGGBBAA) and 4-digit hex (#RGBA), with the alpha last. All current browsers support it (Chrome since 62, Firefox since 49, Safari since 10). A browser without that support does not drop just the alpha: it ignores the whole CSS declaration, so the color is not applied. Older tools may reject an 8-digit hex.
- What is #AARRGGBB?
- The order Android and Flutter use: alpha first, then red, green and blue. #80FF5733 on Android is #FF573380 in CSS. Paste a value starting with 0x and the tool reads it this way; a plain 8-digit hex is read in CSS order, with a switch under the field for Android order.
- Why does my rgba come back as 0.502 instead of 0.5?
- A hex byte has 256 steps, from 0 to 255. 0.5 is stored as 128, and 128 / 255 = 0.50196. Going back to rgba() gives that stored value; the difference is not visible.
- Can I see the transparent color over a photo or video?
- Yes. Under the codes, press “Preview this color on your photo or video” and pick a picture or a clip: the color is laid over it at the opacity you set, like a tint or a color filter, and you can download the result. A photo is saved as JPG if you gave a JPG and as PNG otherwise; a video is saved as MP4 or WebM, whichever your browser can record. A video is re-recorded in real time in your browser, with sound where the browser allows it. The file is not uploaded anywhere.
- How do I get a plain 6-digit hex without transparency?
- Either drop the last two digits, which gives the color at full opacity, or flatten it onto its background. The tool shows both: the opaque hex, and the color drawn on white and on black.
Sources
- W3C. CSS Color Module Level 4, §5.2 «The RGB hexadecimal notations»: in 8-digit hex the last pair is the alpha, 00 fully transparent, ff fully opaque (Candidate Recommendation Draft, 3 November 2026). Link
- Android Developers. android.graphics.Color: color ints are ARGB (alpha in the highest 8 bits); parseColor accepts #RRGGBB and #AARRGGBB. Link
- Flutter API. Color constructor: bits 24–31 are the alpha, written Color(0xAARRGGBB). Link