Android进阶(二十四)Android UI---界面开发推荐颜色

Android UI---界面开发推荐颜色

 

      在Android开发过程中,总要给app添加一些背景,个人认为使用纯色调便可以达到优雅的视觉效果。

      补充一些常用的颜色值:colors.xml

 

 


  
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <resources>
  3. <color name="white">#ffffff</color><!--白色 -->
  4. <color name="ivory">#fffff0</color><!--象牙色 -->
  5. <color name="lightyellow">#ffffe0</color><!--亮黄色 -->
  6. <color name="yellow">#ffff00</color><!--黄色 -->
  7. <color name="snow">#fffafa</color><!--雪白色 -->
  8. <color name="floralwhite">#fffaf0</color><!--花白色 -->
  9. <color name="lemonchiffon">#fffacd</color><!--柠檬绸色 -->
  10. <color name="cornsilk">#fff8dc</color><!--米绸色 -->
  11. <color name="seaShell">#fff5ee</color><!--海贝色 -->
  12. <color name="lavenderblush">#fff0f5</color><!--淡紫红 -->
  13. <color name="papayawhip">#ffefd5</color><!--番木色 -->
  14. <color name="blanchedalmond">#ffebcd</color><!--白杏色 -->
  15. <color name="mistyrose">#ffe4e1</color><!--浅玫瑰色 -->
  16. <color name="bisque">#ffe4c4</color><!--桔黄色 -->
  17. <color name="moccasin">#ffe4b5</color><!--鹿皮色 -->
  18. <color name="navajowhite">#ffdead</color><!--纳瓦白 -->
  19. <color name="peachpuff">#ffdab9</color><!--桃色 -->
  20. <color name="gold">#ffd700</color><!--金色 -->
  21. <color name="pink">#ffc0cb</color><!--粉红色 -->
  22. <color name="lightpink">#ffb6c1</color><!--亮粉红色 -->
  23. <color name="orange">#ffa500</color><!--橙色 -->
  24. <color name="lightsalmon">#ffa07a</color><!--亮肉色 -->
  25. <color name="darkorange">#ff8c00</color><!--暗桔黄色 -->
  26. <color name="coral">#ff7f50</color><!--珊瑚色 -->
  27. <color name="hotpink">#ff69b4</color><!--热粉红色 -->
  28. <color name="tomato">#ff6347</color><!--西红柿色 -->
  29. <color name="orangered">#ff4500</color><!--红橙色 -->
  30. <color name="deeppink">#ff1493</color><!--深粉红色 -->
  31. <color name="fuchsia">#ff00ff</color><!--紫红色 -->
  32. <color name="magenta">#ff00ff</color><!--红紫色 -->
  33. <color name="red">#ff0000</color><!--红色 -->
  34. <color name="oldlace">#fdf5e6</color><!--老花色 -->
  35. <color name="lightgoldenrodyellow">#fafad2</color><!--亮金黄色 -->
  36. <color name="linen">#faf0e6</color><!--亚麻色 -->
  37. <color name="antiquewhite">#faebd7</color><!--古董白 -->
  38. <color name="salmon">#fa8072</color><!--鲜肉色 -->
  39. <color name="ghostwhite">#f8f8ff</color><!--幽灵白 -->
  40. <color name="mintcream">#f5fffa</color><!--薄荷色 -->
  41. <color name="whitesmoke">#f5f5f5</color><!--烟白色 -->
  42. <color name="beige">#f5f5dc</color><!--米色 -->
  43. <color name="wheat">#f5deb3</color><!--浅黄色 -->
  44. <color name="sandybrown">#f4a460</color><!--沙褐色 -->
  45. <color name="azure">#f0ffff</color><!--天蓝色 -->
  46. <color name="honeydew">#f0fff0</color><!--蜜色 -->
  47. <color name="aliceblue">#f0f8ff</color><!--艾利斯兰 -->
  48. <color name="khaki">#f0e68c</color><!--黄褐色 -->
  49. <color name="lightcoral">#f08080</color><!--亮珊瑚色 -->
  50. <color name="palegoldenrod">#eee8aa</color><!--苍麒麟色 -->
  51. <color name="violet">#ee82ee</color><!--紫罗兰色 -->
  52. <color name="darksalmon">#e9967a</color><!--暗肉色 -->
  53. <color name="lavender">#e6e6fa</color><!--淡紫色 -->
  54. <color name="lightcyan">#e0ffff</color><!--亮青色 -->
  55. <color name="burlywood">#deb887</color><!--实木色 -->
  56. <color name="plum">#dda0dd</color><!--洋李色 -->
  57. <color name="gainsboro">#dcdcdc</color><!--淡灰色 -->
  58. <color name="crimson">#dc143c</color><!--暗深红色 -->
  59. <color name="palevioletred">#db7093</color><!--苍紫罗兰色 -->
  60. <color name="goldenrod">#daa520</color><!--金麒麟色 -->
  61. <color name="orchid">#da70d6</color><!--淡紫色 -->
  62. <color name="thistle">#d8bfd8</color><!--蓟色 -->
  63. <color name="lightgray">#d3d3d3</color><!--亮灰色 -->
  64. <color name="lightgrey">#d3d3d3</color><!--亮灰色 -->
  65. <color name="tan">#d2b48c</color><!--茶色 -->
  66. <color name="chocolate">#d2691e</color><!--巧可力色 -->
  67. <color name="peru">#cd853f</color><!--秘鲁色 -->
  68. <color name="indianred">#cd5c5c</color><!--印第安红 -->
  69. <color name="mediumvioletred">#c71585</color><!--中紫罗兰色 -->
  70. <color name="silver">#c0c0c0</color><!--银色 -->
  71. <color name="darkkhaki">#bdb76b</color><!--暗黄褐色 -->
  72. <color name="rosybrown">#bc8f8f</color><!--褐玫瑰红 -->
  73. <color name="mediumorchid">#ba55d3</color><!--中粉紫色 -->
  74. <color name="darkgoldenrod">#b8860b</color><!--暗金黄色 -->
  75. <color name="firebrick">#b22222</color><!--火砖色 -->
  76. <color name="powderblue">#b0e0e6</color><!--粉蓝色 -->
  77. <color name="lightsteelblue">#b0c4de</color><!--亮钢兰色 -->
  78. <color name="paleturquoise">#afeeee</color><!--苍宝石绿 -->
  79. <color name="greenyellow">#adff2f</color><!--黄绿色 -->
  80. <color name="lightblue">#add8e6</color><!--亮蓝色 -->
  81. <color name="darkgray">#a9a9a9</color><!--暗灰色 -->
  82. <color name="darkgrey">#a9a9a9</color><!--暗灰色 -->
  83. <color name="brown">#a52a2a</color><!--褐色 -->
  84. <color name="sienna">#a0522d</color><!--赭色 -->
  85. <color name="darkorchid">#9932cc</color><!--暗紫色 -->
  86. <color name="palegreen">#98fb98</color><!--苍绿色 -->
  87. <color name="darkviolet">#9400d3</color><!--暗紫罗兰色 -->
  88. <color name="mediumpurple">#9370db</color><!--中紫色 -->
  89. <color name="lightgreen">#90ee90</color><!--亮绿色 -->
  90. <color name="darkseagreen">#8fbc8f</color><!--暗海兰色 -->
  91. <color name="saddlebrown">#8b4513</color><!--重褐色 -->
  92. <color name="darkmagenta">#8b008b</color><!--暗洋红 -->
  93. <color name="darkred">#8b0000</color><!--暗红色 -->
  94. <color name="blueviolet">#8a2be2</color><!--紫罗兰蓝色 -->
  95. <color name="lightskyblue">#87cefa</color><!--亮天蓝色 -->
  96. <color name="skyblue">#87ceeb</color><!--天蓝色 -->
  97. <color name="gray">#808080</color><!--灰色 -->
  98. <color name="grey">#808080</color><!--灰色 -->
  99. <color name="olive">#808000</color><!--橄榄色 -->
  100. <color name="purple">#800080</color><!--紫色 -->
  101. <color name="maroon">#800000</color><!--粟色 -->
  102. <color name="aquamarine">#7fffd4</color><!--碧绿色 -->
  103. <color name="chartreuse">#7fff00</color><!--黄绿色 -->
  104. <color name="lawngreen">#7cfc00</color><!--草绿色 -->
  105. <color name="mediumslateblue">#7b68ee</color><!--中暗蓝色 -->
  106. <color name="lightslategray">#778899</color><!--亮蓝灰 -->
  107. <color name="lightslategrey">#778899</color><!--亮蓝灰 -->
  108. <color name="slategray">#708090</color><!--灰石色 -->
  109. <color name="slategrey">#708090</color><!--灰石色 -->
  110. <color name="olivedrab">#6b8e23</color><!--深绿褐色 -->
  111. <color name="slateblue">#6a5acd</color><!--石蓝色 -->
  112. <color name="dimgray">#696969</color><!--暗灰色 -->
  113. <color name="dimgrey">#696969</color><!--暗灰色 -->
  114. <color name="mediumaquamarine">#66cdaa</color><!--中绿色 -->
  115. <color name="cornflowerblue">#6495ed</color><!--菊兰色 -->
  116. <color name="cadetblue">#5f9ea0</color><!--军兰色 -->
  117. <color name="darkolivegreen">#556b2f</color><!--暗橄榄绿 -->
  118. <color name="indigo">#4b0082</color><!--靛青色 -->
  119. <color name="mediumturquoise">#48d1cc</color><!--中绿宝石 -->
  120. <color name="darkslateblue">#483d8b</color><!--暗灰蓝色 -->
  121. <color name="steelblue">#4682b4</color><!--钢兰色 -->
  122. <color name="royalblue">#4169e1</color><!--皇家蓝 -->
  123. <color name="turquoise">#40e0d0</color><!--青绿色 -->
  124. <color name="mediumseagreen">#3cb371</color><!--中海蓝 -->
  125. <color name="limegreen">#32cd32</color><!--橙绿色 -->
  126. <color name="darkslategray">#2f4f4f</color><!--暗瓦灰色 -->
  127. <color name="darkslategrey">#2f4f4f</color><!--暗瓦灰色 -->
  128. <color name="seagreen">#2e8b57</color><!--海绿色 -->
  129. <color name="forestgreen">#228b22</color><!--森林绿 -->
  130. <color name="lightseagreen">#20b2aa</color><!--亮海蓝色 -->
  131. <color name="dodgerblue">#1e90ff</color><!--闪兰色 -->
  132. <color name="midnightblue">#191970</color><!--中灰兰色 -->
  133. <color name="aqua">#00ffff</color><!--浅绿色 -->
  134. <color name="cyan">#00ffff</color><!--青色 -->
  135. <color name="springgreen">#00ff7f</color><!--春绿色 -->
  136. <color name="lime">#00ff00</color><!--酸橙色 -->
  137. <color name="mediumspringgreen">#00fa9a</color><!--中春绿色 -->
  138. <color name="darkturquoise">#00ced1</color><!--暗宝石绿 -->
  139. <color name="deepskyblue">#00bfff</color><!--深天蓝色 -->
  140. <color name="darkcyan">#008b8b</color><!--暗青色 -->
  141. <color name="teal">#008080</color><!--水鸭色 -->
  142. <color name="green">#008000</color><!--绿色 -->
  143. <color name="darkgreen">#006400</color><!--暗绿色 -->
  144. <color name="blue">#0000ff</color><!--蓝色 -->
  145. <color name="mediumblue">#0000cd</color><!--中兰色 -->
  146. <color name="darkblue">#00008b</color><!--暗蓝色 -->
  147. <color name="navy">#000080</color><!--海军色 -->
  148. <color name="black">#000000</color><!--黑色 -->
  149. </resources>

 

附1 如何通过colors.xml文件配置颜色

      android:background="@color/tan"

      根据标签名进行查找的。

附2 marginLeft与paddingLeft的区别

      margin为外边框,border为边框,padding为内边框。

参考文献

1.http://aichixihongshi.iteye.com/blog/1181834

2.http://www.cnblogs.com/FlyFive/archive/2013/01/03/2843230.html

美文美图

 

文章来源: shq5785.blog.csdn.net,作者:No Silver Bullet,版权归原作者所有,如需转载,请联系作者。

原文链接:shq5785.blog.csdn.net/article/details/51811727

(完)