以下是摘自文章8-Digit Hex Codes?的alpha值的十进制和十六进制对照表:
Alpha % | Hex | Rgb 255 |
---|---|---|
100% | FF | 255 |
95% | F2 | 242 |
90% | E6 | 230 |
85% | D9 | 217 |
80% | CC | 204 |
75% | BF | 191 |
70% | B3 | 179 |
65% | A6 | 166 |
60% | 99 | 153 |
55% | 8C | 140 |
50% | 80 | 128 |
45% | 73 | 115 |
40% | 66 | 102 |
35% | 59 | 89 |
30% | 4D | 77 |
25% | 40 | 64 |
20% | 33 | 51 |
15% | 26 | 38 |
10% | 1A | 26 |
5% | 0D | 13 |
0% | 00 | 0 |
根据以上表,我在6位HEX后面加上字符串D9就能轻松搞定背景颜色设置透明度85%的需求了~
网友评论