Color.HSV Class
Color provides static methods for color conversion hsv values.
Y.Color.toHSV('f00'); // hsv(0, 100%, 100%)
Y.Color.toHSVA('rgb(255, 255, 0'); // hsva(60, 100%, 100%, 1)
Index
Methods
_hsvToRgb
(
String | Array
protected
-
str
-
[toArray]
Parses the HSV string into r, b, g values. Will return an Array of values or an RGB string.
Parameters:
-
str
String -
[toArray]
Boolean optional
Returns:
String | Array:
_rgbToHsv
(
String | Array
protected
-
str
-
[toArray]
Parses the RGB string into h, s, v values. Will return an Array of values or an HSV string.
Parameters:
-
str
String -
[toArray]
Boolean optional
Returns:
String | Array:
toHSV
(
String
public
-
str
Converts provided color value to an HSV string.
Parameters:
-
str
String
Returns:
String:
toHSVA
(
String
public
-
str
Converts provided color value to an HSVA string.
Parameters:
-
str
String
Returns:
String:
Properties
REGEX_HSV
RegExp
static
Default: /hsva?\(([.\d]*), ?([.\d]*)%, ?([.\d]*)%,? ?([.\d]*)?\)/
STR_HSV
String
static
Default: hsv({*}, {*}%, {*}%)
STR_HSVA
String
static
Default: hsva({*}, {*}%, {*}%, {*})