# new Color(redopt, greenopt, blueopt, alphaopt)
颜色类
参数:
名称 | 类型 | 默认值 | 描述 |
---|---|---|---|
red |
Number | 0.0 | 红色 |
green |
Number | 0.0 | 绿色 |
blue |
Number | 0.0 | 蓝色 |
alpha |
Number | 1.0 | 透明度 |
方法
# static fromColor(hex字符串或rgba字符串或Color对象)
转换为color对象
参数:
名称 | 类型 | 描述 |
---|---|---|
hex字符串或rgba字符串或Color对象 |
Color | String |
转换后的颜色对象