Convert HEX color codes to RGBA with a custom alpha, and to ARGB (#AARRGGBB) for Android and .NET. Instant, with preview.
| Input | Output |
|---|---|
| #3B82F6, alpha 0.5 | rgba(59, 130, 246, 0.5) · #803B82F6 |
| #FF0000, alpha 1 | rgba(255, 0, 0, 1) · #FFFF0000 |
| #000, alpha 0.25 | rgba(0, 0, 0, 0.25) · #40000000 |
Only the position of the alpha channel: RGBA puts it last (CSS style: red, green, blue, alpha 0–1), ARGB puts it first as a two-digit hex prefix (#AARRGGBB) — used by Android, XAML and .NET. The color is identical.
Alpha (0–1) is multiplied by 255 and rounded to a hex byte: 1.0 = FF, 0.5 ≈ 80, 0.25 ≈ 40, 0 = 00. So #3B82F6 at 50% becomes #803B82F6.
Yes — #F6B expands to #FF66BB (each digit doubles) before conversion, exactly like CSS does.