ARGB 颜色取值与透明度搭配

ARGB 依次代表透明度(alpha)、红色(red)、绿色(green)、蓝色(blue)。

#FF99CC00 为例,其中,FF 是透明度,99 是红色值, CC 是绿色值, 00 是蓝色值。

 

1. 透明度分为256阶(0-255),计算机上用16进制表示为(00-ff)。透明就是0阶,不透明就是255阶,如果50%透明就是127阶(256的一半当然是128,但因为是从0开始,所以实际上是127)。

2.透明度 和 不透明度是两个概念, 它们加起来是1,或者100%.

 

    //透明度;alpha 取值对照  
    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  

 

 


 


 

RGB颜色查询对照表

 


RGB颜色对照表

  #FFFFFF   #FFFFF0   #FFFFE0   #FFFF00
  #FFFAFA   #FFFAF0   #FFFACD   #FFF8DC
  #FFF68F   #FFF5EE   #FFF0F5   #FFEFDB
  #FFEFD5   #FFEC8B   #FFEBCD   #FFE7BA
  #FFE4E1   #FFE4C4   #FFE4B5   #FFE1FF
  #FFDEAD   #FFDAB9   #FFD700   #FFD39B
  #FFC1C1   #FFC125   #FFC0CB   #FFBBFF
  #FFB90F   #FFB6C1   #FFB5C5   #FFAEB9
  #FFA54F   #FFA500   #FFA07A   #FF8C69
  #FF8C00   #FF83FA   #FF82AB   #FF8247
  #FF7F50   #FF7F24   #FF7F00   #FF7256
  #FF6EB4   #FF6A6A   #FF69B4   #FF6347
  #FF4500   #FF4040   #FF3E96   #FF34B3
  #FF3030   #FF1493   #FF00FF   #FF0000
  #FDF5E6   #FCFCFC   #FAFAFA   #FAFAD2
  #FAF0E6   #FAEBD7   #FA8072   #F8F8FF
  #F7F7F7   #F5FFFA   #F5F5F5   #F5F5DC
  #F5DEB3   #F4F4F4   #F4A460   #F2F2F2
  #F0FFFF   #F0FFF0   #F0F8FF   #F0F0F0
  #F0E68C   #F08080   #EEEEE0   #EEEED1
  #EEEE00   #EEE9E9   #EEE9BF   #EEE8CD
  #EEE8AA   #EEE685   #EEE5DE   #EEE0E5
  #EEDFCC   #EEDC82   #EED8AE   #EED5D2
  #EED5B7   #EED2EE   #EECFA1   #EECBAD
  #EEC900   #EEC591   #EEB4B4   #EEB422
  #EEAEEE   #EEAD0E   #EEA9B8   #EEA2AD
  #EE9A49   #EE9A00   #EE9572   #EE82EE
  #EE8262   #EE7AE9   #EE799F   #EE7942
  #EE7621   #EE7600   #EE6AA7   #EE6A50
  #EE6363   #EE5C42   #EE4000   #EE3B3B
  #EE3A8C   #EE30A7   #EE2C2C   #EE1289
  #EE00EE   #EE0000   #EDEDED   #EBEBEB
  #EAEAEA   #E9967A   #E8E8E8   #E6E6FA
  #E5E5E5   #E3E3E3   #E0FFFF   #E0EEEE
  #E0EEE0   #E0E0E0   #E066FF   #DEDEDE
  #DEB887   #DDA0DD   #DCDCDC   #DC143C
  #DBDBDB   #DB7093   #DAA520   #DA70D6
  #D9D9D9   #D8BFD8   #D6D6D6   #D4D4D4
  #D3D3D3   #D2B48C   #D2691E   #D1EEEE
  #D1D1D1   #D15FEE   #D02090   #CFCFCF
  #CDCDC1   #CDCDB4   #CDCD00   #CDC9C9
  #CDC9A5   #CDC8B1   #CDC673   #CDC5BF
  #CDC1C5   #CDC0B0   #CDBE70   #CDBA96
  #CDB7B5   #CDB79E   #CDB5CD   #CDB38B
  #CDAF95   #CDAD00   #CDAA7D   #CD9B9B
  #CD9B1D   #CD96CD   #CD950C   #CD919E
  #CD8C95   #CD853F   #CD8500   #CD8162
  #CD7054   #CD69C9   #CD6889   #CD6839
  #CD661D   #CD6600   #CD6090   #CD5C5C
  #CD5B45   #CD5555   #CD4F39   #CD3700
  #CD3333   #CD3278   #CD2990   #CD2626
  #CD1076   #CD00CD   #CD0000   #CCCCCC
  #CAFF70   #CAE1FF   #C9C9C9   #C7C7C7
  #C71585   #C6E2FF   #C67171   #C5C1AA
  #C4C4C4   #C2C2C2   #C1FFC1   #C1CDCD
  #C1CDC1   #C1C1C1   #C0FF3E   #BFEFFF
  #BFBFBF   #BF3EFF   #BEBEBE   #BDBDBD
  #BDB76B   #BCEE68   #BCD2EE   #BC8F8F
  #BBFFFF   #BABABA   #BA55D3   #B9D3EE
  #B8B8B8   #B8860B   #B7B7B7   #B5B5B5
  #B4EEB4   #B4CDCD   #B452CD   #B3EE3A
  #B3B3B3   #B2DFEE   #B23AEE   #B22222
  #B0E2FF   #B0E0E6   #B0C4DE   #B0B0B0
  #B03060   #AEEEEE   #ADFF2F   #ADD8E6
  #ADADAD   #ABABAB   #AB82FF   #AAAAAA
  #A9A9A9   #A8A8A8   #A6A6A6   #A52A2A
  #A4D3EE   #A3A3A3   #A2CD5A   #A2B5CD
  #A1A1A1   #A0522D   #A020F0   #9FB6CD
  #9F79EE   #9E9E9E   #9C9C9C   #9BCD9B
  #9B30FF   #9AFF9A   #9ACD32   #9AC0CD
  #9A32CD   #999999   #9932CC   #98FB98
  #98F5FF   #97FFFF   #96CDCD   #969696
  #949494   #9400D3   #9370DB   #919191
  #912CEE   #90EE90   #8FBC8F   #8F8F8F
  #8EE5EE   #8E8E8E   #8E8E38   #8E388E
  #8DEEEE   #8DB6CD   #8C8C8C   #8B8B83
  #8B8B7A   #8B8B00   #8B8989   #8B8970
  #8B8878   #8B8682   #8B864E   #8B8386
  #8B8378   #8B814C   #8B7E66   #8B7D7B
  #8B7D6B   #8B7B8B   #8B795E   #8B7765
  #8B7500   #8B7355   #8B6969   #8B6914
  #8B668B   #8B6508   #8B636C   #8B5F65
  #8B5A2B   #8B5A00   #8B5742   #8B4C39
  #8B4789   #8B475D   #8B4726   #8B4513
  #8B4500   #8B3E2F   #8B3A62   #8B3A3A
  #8B3626   #8B2500   #8B2323   #8B2252
  #8B1C62   #8B1A1A   #8B0A50   #8B008B
  #8B0000   #8A8A8A   #8A2BE2   #8968CD
  #87CEFF   #87CEFA   #87CEEB   #878787
  #858585   #848484   #8470FF   #838B8B
  #838B83   #836FFF   #828282   #7FFFD4
  #7FFF00   #7F7F7F   #7EC0EE   #7D9EC0
  #7D7D7D   #7D26CD   #7CFC00   #7CCD7C
  #7B68EE   #7AC5CD   #7A8B8B   #7A7A7A
  #7A67EE   #7A378B   #79CDCD   #787878
  #778899   #76EEC6   #76EE00   #757575
  #737373   #71C671   #7171C6   #708090
  #707070   #6E8B3D   #6E7B8B   #6E6E6E
  #6CA6CD   #6C7B8B   #6B8E23   #6B6B6B
  #6A5ACD   #698B69   #698B22   #696969
  #6959CD   #68838B   #68228B   #66CDAA
  #66CD00   #668B8B   #666666   #6495ED
  #63B8FF   #636363   #616161   #607B8B
  #5F9EA0   #5E5E5E   #5D478B   #5CACEE
  #5C5C5C   #5B5B5B   #595959   #575757
  #556B2F   #555555   #551A8B   #54FF9F
  #548B54   #545454   #53868B   #528B8B
  #525252   #515151   #4F94CD   #4F4F4F
  #4EEE94   #4D4D4D   #4B0082   #4A708B
  #4A4A4A   #48D1CC   #4876FF   #483D8B
  #474747   #473C8B   #4682B4   #458B74
  #458B00   #454545   #43CD80   #436EEE
  #424242   #4169E1   #40E0D0   #404040
  #3D3D3D   #3CB371   #3B3B3B   #3A5FCD
  #388E8E   #383838   #36648B   #363636
  #333333   #32CD32   #303030   #2F4F4F
  #2E8B57   #2E2E2E   #2B2B2B   #292929
  #282828   #27408B   #262626   #242424
  #228B22   #218868   #212121   #20B2AA
  #1F1F1F   #1E90FF   #1E1E1E   #1C86EE
  #1C1C1C   #1A1A1A   #191970   #1874CD
  #171717   #141414   #121212   #104E8B
  #0F0F0F   #0D0D0D   #0A0A0A   #080808
  #050505   #030303   #00FFFF   #00FF7F
  #00FF00   #00FA9A   #00F5FF   #00EEEE
  #00EE76   #00EE00   #00E5EE   #00CED1
  #00CDCD   #00CD66   #00CD00   #00C5CD
  #00BFFF   #00B2EE   #009ACD   #008B8B
  #008B45   #008B00   #00868B   #00688B
  #006400   #0000FF   #0000EE   #0000CD
  #0000AA   #00008B   #000080   #000000

代码:
    <?xml version="1.0" encoding="utf-8"?>  
    <resources>  
        <color name="white">#FFFFFF</color> <!--白色 -->  
        <color name="ivory">#FFFFF0</color> <!--象牙色 -->  
        <color name="lightyellow">#FFFFE0</color> <!--亮黄色 -->  
        <color name="yellow">#FFFF00</color> <!--黄色 -->  
        <color name="snow">#FFFAFA</color> <!--雪白色 -->  
        <color name="floralwhite">#FFFAF0</color> <!--花白色 -->  
        <color name="lemonchiffon">#FFFACD</color> <!--柠檬绸色 -->  
        <color name="cornsilk">#FFF8DC</color> <!--米绸色 -->  
        <color name="seashell">#FFF5EE</color> <!--海贝色 -->  
        <color name="lavenderblush">#FFF0F5</color> <!--淡紫红 -->  
        <color name="papayawhip">#FFEFD5</color> <!--番木色 -->  
        <color name="blanchedalmond">#FFEBCD</color> <!--白杏色 -->  
        <color name="mistyrose">#FFE4E1</color> <!--浅玫瑰色 -->  
        <color name="bisque">#FFE4C4</color> <!--桔黄色 -->  
        <color name="moccasin">#FFE4B5</color> <!--鹿皮色 -->  
        <color name="navajowhite">#FFDEAD</color> <!--纳瓦白 -->  
        <color name="peachpuff">#FFDAB9</color> <!--桃色 -->  
        <color name="gold">#FFD700</color> <!--金色 -->  
        <color name="pink">#FFC0CB</color> <!--粉红色 -->  
        <color name="lightpink">#FFB6C1</color> <!--亮粉红色 -->  
        <color name="orange">#FFA500</color> <!--橙色 -->  
        <color name="lightsalmon">#FFA07A</color> <!--亮肉色 -->  
        <color name="darkorange">#FF8C00</color> <!--暗桔黄色 -->  
        <color name="coral">#FF7F50</color> <!--珊瑚色 -->  
        <color name="hotpink">#FF69B4</color> <!--热粉红色 -->  
        <color name="tomato">#FF6347</color> <!--西红柿色 -->  
        <color name="orangered">#FF4500</color> <!--红橙色 -->  
        <color name="deeppink">#FF1493</color> <!--深粉红色 -->  
        <color name="fuchsia">#FF00FF</color> <!--紫红色 -->  
        <color name="magenta">#FF00FF</color> <!--红紫色 -->  
        <color name="red">#FF0000</color> <!--红色 -->  
        <color name="oldlace">#FDF5E6</color> <!--老花色 -->  
        <color name="lightgoldenrodyellow">#FAFAD2</color> <!--亮金黄色 -->  
        <color name="linen">#FAF0E6</color> <!--亚麻色 -->  
        <color name="antiquewhite">#FAEBD7</color> <!--古董白 -->  
        <color name="salmon">#FA8072</color> <!--鲜肉色 -->  
        <color name="ghostwhite">#F8F8FF</color> <!--幽灵白 -->  
        <color name="mintcream">#F5FFFA</color> <!--薄荷色 -->  
        <color name="whitesmoke">#F5F5F5</color> <!--烟白色 -->  
        <color name="beige">#F5F5DC</color> <!--米色 -->  
        <color name="wheat">#F5DEB3</color> <!--浅黄色 -->  
        <color name="sandybrown">#F4A460</color> <!--沙褐色 -->  
        <color name="azure">#F0FFFF</color> <!--天蓝色 -->  
        <color name="honeydew">#F0FFF0</color> <!--蜜色 -->  
        <color name="aliceblue">#F0F8FF</color> <!--艾利斯兰 -->  
        <color name="khaki">#F0E68C</color> <!--黄褐色 -->  
        <color name="lightcoral">#F08080</color> <!--亮珊瑚色 -->  
        <color name="palegoldenrod">#EEE8AA</color> <!--苍麒麟色 -->  
        <color name="violet">#EE82EE</color> <!--紫罗兰色 -->  
        <color name="darksalmon">#E9967A</color> <!--暗肉色 -->  
        <color name="lavender">#E6E6FA</color> <!--淡紫色 -->  
        <color name="lightcyan">#E0FFFF</color> <!--亮青色 -->  
        <color name="burlywood">#DEB887</color> <!--实木色 -->  
        <color name="plum">#DDA0DD</color> <!--洋李色 -->  
        <color name="gainsboro">#DCDCDC</color> <!--淡灰色 -->  
        <color name="crimson">#DC143C</color> <!--暗深红色 -->  
        <color name="palevioletred">#DB7093</color> <!--苍紫罗兰色 -->  
        <color name="goldenrod">#DAA520</color> <!--金麒麟色 -->  
        <color name="orchid">#DA70D6</color> <!--淡紫色 -->  
        <color name="thistle">#D8BFD8</color> <!--蓟色 -->  
        <color name="lightgray">#D3D3D3</color> <!--亮灰色 -->  
        <color name="lightgrey">#D3D3D3</color> <!--亮灰色 -->  
        <color name="tan">#D2B48C</color> <!--茶色 -->  
        <color name="chocolate">#D2691E</color> <!--巧可力色 -->  
        <color name="peru">#CD853F</color> <!--秘鲁色 -->  
        <color name="indianred">#CD5C5C</color> <!--印第安红 -->  
        <color name="mediumvioletred">#C71585</color> <!--中紫罗兰色 -->  
        <color name="silver">#C0C0C0</color> <!--银色 -->  
        <color name="darkkhaki">#BDB76B</color> <!--暗黄褐色-->  
        <color name="rosybrown">#BC8F8F</color> <!--褐玫瑰红 -->  
        <color name="mediumorchid">#BA55D3</color> <!--中粉紫色 -->  
        <color name="darkgoldenrod">#B8860B</color> <!--暗金黄色 -->  
        <color name="firebrick">#B22222</color> <!--火砖色 -->  
        <color name="powderblue">#B0E0E6</color> <!--粉蓝色 -->  
        <color name="lightsteelblue">#B0C4DE</color> <!--亮钢兰色-->  
        <color name="paleturquoise">#AFEEEE</color> <!--苍宝石绿 -->  
        <color name="greenyellow">#ADFF2F</color> <!--黄绿色 -->  
        <color name="lightblue">#ADD8E6</color> <!--亮蓝色 -->  
        <color name="darkgray">#A9A9A9</color> <!--暗灰色 -->  
        <color name="darkgrey">#A9A9A9</color> <!--暗灰色 -->  
        <color name="brown">#A52A2A</color> <!--褐色 -->  
        <color name="sienna">#A0522D</color> <!--赭色 -->  
        <color name="darkorchid">#9932CC</color> <!--暗紫色 -->  
        <color name="palegreen">#98FB98</color> <!--苍绿色 -->  
        <color name="darkviolet">#9400D3</color> <!--暗紫罗兰色 -->  
        <color name="mediumpurple">#9370DB</color> <!--中紫色 -->  
        <color name="lightgreen">#90EE90</color> <!--亮绿色 -->  
        <color name="darkseagreen">#8FBC8F</color> <!--暗海兰色 -->  
        <color name="saddlebrown">#8B4513</color> <!--重褐色 -->  
        <color name="darkmagenta">#8B008B</color> <!--暗洋红 -->  
        <color name="darkred">#8B0000</color> <!--暗红色 -->  
        <color name="blueviolet">#8A2BE2</color> <!--紫罗兰蓝色 -->  
        <color name="lightskyblue">#87CEFA</color> <!--亮天蓝色 -->  
        <color name="skyblue">#87CEEB</color> <!--天蓝色 -->  
        <color name="gray">#808080</color> <!--灰色 -->  
        <color name="grey">#808080</color> <!--灰色 -->  
        <color name="olive">#808000</color> <!--橄榄色 -->  
        <color name="purple">#800080</color> <!--紫色 -->  
        <color name="maroon">#800000</color> <!--粟色 -->  
        <color name="aquamarine">#7FFFD4</color> <!--碧绿色 -->  
        <color name="chartreuse">#7FFF00</color> <!--黄绿色 -->  
        <color name="lawngreen">#7CFC00</color> <!--草绿色 -->  
        <color name="mediumslateblue">#7B68EE</color> <!--中暗蓝色 -->  
        <color name="lightslategray">#778899</color> <!--亮蓝灰 -->  
        <color name="lightslategrey">#778899</color> <!--亮蓝灰 -->  
        <color name="slategray">#708090</color> <!--灰石色 -->  
        <color name="slategrey">#708090</color> <!--灰石色 -->  
        <color name="olivedrab">#6B8E23</color> <!--深绿褐色 -->  
        <color name="slateblue">#6A5ACD</color> <!--石蓝色 -->  
        <color name="dimgray">#696969</color> <!--暗灰色 -->  
        <color name="dimgrey">#696969</color> <!--暗灰色 -->  
        <color name="mediumaquamarine">#66CDAA</color> <!--中绿色 -->  
        <color name="cornflowerblue">#6495ED</color> <!--菊兰色 -->  
        <color name="cadetblue">#5F9EA0</color> <!--军兰色 -->  
        <color name="darkolivegreen">#556B2F</color> <!--暗橄榄绿-->  
        <color name="indigo">#4B0082</color> <!--靛青色 -->  
        <color name="mediumturquoise">#48D1CC</color> <!--中绿宝石 -->  
        <color name="darkslateblue">#483D8B</color> <!--暗灰蓝色 -->  
        <color name="steelblue">#4682B4</color> <!--钢兰色 -->  
        <color name="royalblue">#4169E1</color> <!--皇家蓝 -->  
        <color name="turquoise">#40E0D0</color> <!--青绿色 -->  
        <color name="mediumseagreen">#3CB371</color> <!--中海蓝 -->  
        <color name="limegreen">#32CD32</color> <!--橙绿色 -->  
        <color name="darkslategray">#2F4F4F</color> <!--暗瓦灰色 -->  
        <color name="darkslategrey">#2F4F4F</color> <!--暗瓦灰色 -->  
        <color name="seagreen">#2E8B57</color> <!--海绿色 -->  
        <color name="forestgreen">#228B22</color> <!--森林绿 -->  
        <color name="lightseagreen">#20B2AA</color> <!--亮海蓝色 -->  
        <color name="dodgerblue">#1E90FF</color> <!--闪兰色 -->  
        <color name="midnightblue">#191970</color> <!--中灰兰色 -->  
        <color name="aqua">#00FFFF</color> <!--浅绿色 -->  
        <color name="cyan">#00FFFF</color> <!--青色 -->  
        <color name="springgreen">#00FF7F</color> <!--春绿色 -->  
        <color name="lime">#00FF00</color> <!--酸橙色 -->  
        <color name="mediumspringgreen">#00FA9A</color> <!--中春绿色 -->  
        <color name="darkturquoise">#00CED1</color> <!--暗宝石绿 -->  
        <color name="deepskyblue">#00BFFF</color> <!--深天蓝色 -->  
        <color name="darkcyan">#008B8B</color> <!--暗青色 -->  
        <color name="teal">#008080</color> <!--水鸭色 -->  
        <color name="green">#008000</color> <!--绿色 -->  
        <color name="darkgreen">#006400</color> <!--暗绿色 -->  
        <color name="blue">#0000FF</color> <!--蓝色 -->  
        <color name="mediumblue">#0000CD</color> <!--中兰色 -->  
        <color name="darkblue">#00008B</color> <!--暗蓝色 -->  
        <color name="navy">#000080</color> <!--海军色 -->  
        <color name="black">#000000</color> <!--黑色 -->  
      
    </resources>  
 
转自:http://blog.csdn.net/pinglingying/article/details/52403819

 

posted @ 2017-12-28 11:23  皮皮留声机  阅读(15038)  评论(1编辑  收藏  举报