Wednesday, November 5, 2014

How to make transparent color in Android?


If you are an Android developer it's very likely that you need to use some transparent colors.

So, here is list of hex values of transparent colors:
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

So if you need to use 60% transparent black color that would be #9900000, where 99 represents 60% opacity and 000000 is hex code for black color.

As you can see it's pretty easy to make any color transparent, just use hex value of that color, and add two hex values from the list above.

0 comments:

Post a Comment