Function: isValidHexadecimalColor

isValidHexadecimalColor(val): boolean

是否为有效的16进制颜色

Parameters

Name Type Description
val string 需要验证的颜色字符串

Returns

boolean

  • 返回验证结果

Example

isValidHexadecimalColor('#f00');
// => true

Example

isValidHexadecimalColor('#fe9de8');
// => true
ON THIS PAGE