00%=FF(不透明)
5%=F2
10%=E5
15%=D8
20%=CC
25%=BF
30%=B2
35%=A5
40%=99
45%=8c
50%=7F
55%=72
60%=66
65%=59
70%=4c
75%=3F
80%=33
85%=21
90%=19
95%=0c
100%=00(全透明)
UI給出的顏色值為#FF0000化撕,透明度30%充活。
結(jié)合上表哼鬓,30%的透明度16進(jìn)制的值為 B3,那么最終的顏色值為 #B3FF0000
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="translucent">#00000000</color>
<color name="black">#000000</color>
<color name="white">#ffffff</color>
<color name="dark">#88888888</color>
<!--白色透明度-->
<color name="translucent_white_05">#f2ffffff</color>
<color name="translucent_white_10">#e6ffffff</color>
<color name="translucent_white_15">#d9ffffff</color>
<color name="translucent_white_20">#ccffffff</color>
<color name="translucent_white_25">#bfffffff</color>
<color name="translucent_white_30">#b3ffffff</color>
<color name="translucent_white_35">#a6ffffff</color>
<color name="translucent_white_40">#99ffffff</color>
<color name="translucent_white_45">#8cffffff</color>
<color name="translucent_white_50">#80ffffff</color>
<color name="translucent_white_55">#73ffffff</color>
<color name="translucent_white_60">#66ffffff</color>
<color name="translucent_white_65">#59ffffff</color>
<color name="translucent_white_70">#4dffffff</color>
<color name="translucent_white_75">#40ffffff</color>
<color name="translucent_white_80">#33ffffff</color>
<color name="translucent_white_90">#26ffffff</color>
<color name="translucent_white_95">#0dffffff</color>
<!--黑色透明度-->
<color name="translucent_black_05">#f2000000</color>
<color name="translucent_black_10">#e6000000</color>
<color name="translucent_black_15">#d9000000</color>
<color name="translucent_black_20">#cc000000</color>
<color name="translucent_black_25">#bf000000</color>
<color name="translucent_black_30">#b3000000</color>
<color name="translucent_black_35">#a6000000</color>
<color name="translucent_black_40">#99000000</color>
<color name="translucent_black_45">#8c000000</color>
<color name="translucent_black_50">#80000000</color>
<color name="translucent_black_55">#73000000</color>
<color name="translucent_black_60">#66000000</color>
<color name="translucent_black_65">#59000000</color>
<color name="translucent_black_70">#4d000000</color>
<color name="translucent_black_75">#40000000</color>
<color name="translucent_black_80">#33000000</color>
<color name="translucent_black_90">#26000000</color>
<color name="translucent_black_95">#0d000000</color>
</resources>