Compare
Color.inspect(color, initialValue): string
把一个颜色对象转换成可读的字符串形式,一般用来debug
color: Color
The Color object to format
initialValue: string
这是一个可选参数,A canonical hex string to be used instead of an rgba() value.
returns: string
Color.isColor(color): boolean
验证传进来的参数是不是合法的颜色值
color: string | Color
要进行验证的值
returns: boolean
Color.isColorObject(color):color is object & Color
验证传进来的参数是否为一个color对象,返回true或false
color: any
一个颜色对象或者其他
returns: color is object & Color
Color.isColorString(colorString): boolean
检查传进来的值是否为一个合法的颜色值的字符串,返回true或者false
colorString: string | object
A string representing a color
returns: boolean
Last updated
Was this helpful?