4.2.1 类Color基础
类Color有如下三种静态方法。
(1)static int argb(int alpha,int red,int green,int blue):功能是构造一个包含透明对象的颜色。(https://www.daowen.com)
(2)static int rgb(int red,int green,int blue):功能是构造一个标准的颜色对象。
(3)static int parseColor(String colorString):功能是解析一种颜色字符串的值,比如传入Color.BLACK。
类Color返回的都是一个整型结果,例如返回0xff00ff00表示绿色,返回0xffff0000表示红色。可以将这个DWORD型看做AARRGGBB,AA代表Aphla透明色,后面“RR”“GG”和“BB”分别对应RGB颜色值,取值范围是0~255。