Android Transparency Hex
Jul 25, 2017 · 2 min read
Android uses hexadecimal ARGB values, which are formatted as #AARRGGBB. The AA, represent the alpha channel. During UI design sometimes you want to add alpha channel(Opacity) to your colors. Instead of doing Math here is quick list for you referencing needs.

Hex Opacity Values
- 100% — FF
- 95% — F2
- 90% — E6
- 85% — D9
- 80% — CC
- 75% — BF
- 70% — B3
- 65% — A6
- 60% — 99
- 55% — 8C
- 50% — 80
- 45% — 73
- 40% — 66
- 35% — 59
- 30% — 4D
- 25% — 40
- 20% — 33
- 15% — 26
- 10% — 1A
- 5% — 0D
- 0% — 00
If you want to do the math:
- Take your opacity as a decimal value and multiply it by 255. So, if you have a block that is 50% opaque the decimal value would be .5. For example: .5 x 255 = 127.5
- The fraction won’t convert to hexadecimal, so you must round your number up or down to the nearest whole number. For example: 127.5 rounds up to 128; 55.25 rounds down to 55.
- Enter your decimal value in a decimal-to-hexadecimal converter, like http://www.binaryhexconverter.com/decimal-to-hex-converter, and convert your values.Add a zero if you get back a single value.
Math Credit:Peter Mortensen
