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%。
结合上表,30%的透明度16进制的值为 B3,那么最终的颜色值为 #B3FF0000
<?xml version="1.0" encoding="utf-8"?><resources><colorname="translucent">#00000000</color><colorname="black">#000000</color><colorname="white">#ffffff</color><colorname="dark">#88888888</color><!--白色透明度--><colorname="translucent_white_05">#f2ffffff</color><colorname="translucent_white_10">#e6ffffff</color><colorname="translucent_white_15">#d9ffffff</color><colorname="translucent_white_20">#ccffffff</color><colorname="translucent_white_25">#bfffffff</color><colorname="translucent_white_30">#b3ffffff</color><colorname="translucent_white_35">#a6ffffff</color><colorname="translucent_white_40">#99ffffff</color><colorname="translucent_white_45">#8cffffff</color><colorname="translucent_white_50">#80ffffff</color><colorname="translucent_white_55">#73ffffff</color><colorname="translucent_white_60">#66ffffff</color><colorname="translucent_white_65">#59ffffff</color><colorname="translucent_white_70">#4dffffff</color><colorname="translucent_white_75">#40ffffff</color><colorname="translucent_white_80">#33ffffff</color><colorname="translucent_white_90">#26ffffff</color><colorname="translucent_white_95">#0dffffff</color><!--黑色透明度--><colorname="translucent_black_05">#f2000000</color><colorname="translucent_black_10">#e6000000</color><colorname="translucent_black_15">#d9000000</color><colorname="translucent_black_20">#cc000000</color><colorname="translucent_black_25">#bf000000</color><colorname="translucent_black_30">#b3000000</color><colorname="translucent_black_35">#a6000000</color><colorname="translucent_black_40">#99000000</color><colorname="translucent_black_45">#8c000000</color><colorname="translucent_black_50">#80000000</color><colorname="translucent_black_55">#73000000</color><colorname="translucent_black_60">#66000000</color><colorname="translucent_black_65">#59000000</color><colorname="translucent_black_70">#4d000000</color><colorname="translucent_black_75">#40000000</color><colorname="translucent_black_80">#33000000</color><colorname="translucent_black_90">#26000000</color><colorname="translucent_black_95">#0d000000</color></resources>