Android 颜色透明度(Alpha)级别

示例

十六进制不透明度值

    ------------------------------
   |   Alpha(%)  |   Hex Value    |
    ------------------------------
   |    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        |
    ------------------------------

如果要将45%设置为红色。

<color name="red_with_alpha_45">#73FF0000</color>

红色的十六进制值-#FF0000

您可以在前缀中添加73以实现45%的不透明度-#73FF0000