Show:
Module: color-hsv
Parent Module: color

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

Properties

Methods

_hsvToRgb

(
  • str
  • [toArray]
)
String | Array protected

Defined in yui3/src/color/js/color-hsv.js:122

Available since 3.8.0

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

(
  • str
  • [toArray]
)
String | Array protected

Defined in yui3/src/color/js/color-hsv.js:70

Available since 3.8.0

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

(
  • str
)
String public

Defined in yui3/src/color/js/color-hsv.js:44

Available since 3.8.0

Converts provided color value to an HSV string.

Parameters:

  • str String

Returns:

String:

toHSVA

(
  • str
)
String public

Defined in yui3/src/color/js/color-hsv.js:57

Available since 3.8.0

Converts provided color value to an HSVA string.

Parameters:

  • str String

Returns:

String:

Properties

REGEX_HSV

RegExp static

Defined in yui3/src/color/js/color-hsv.js:17

Available since 3.8.0

Default: /hsva?\(([.\d]*), ?([.\d]*)%, ?([.\d]*)%,? ?([.\d]*)?\)/

STR_HSV

String static

Defined in yui3/src/color/js/color-hsv.js:26

Available since 3.8.0

Default: hsv({*}, {*}%, {*}%)

STR_HSVA

String static

Defined in yui3/src/color/js/color-hsv.js:35

Available since 3.8.0

Default: hsva({*}, {*}%, {*}%, {*})