#

API Docs for: 3.10.3
Show: Inherited Protected Private Deprecated

# Color.HSV Class

Defined in: `color/js/color-hsv.js:1`
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
- Methods
- Properties

## Item Index

### Methods

- _hsvToRgb
- _rgbToHsv
- toHSV
- toHSVA

### Properties

- REGEX_HSV static
- STR_HSV static
- STR_HSVA static

## Methods

### `_hsvToRgb`

(

- `str`
- `[toArray]`

)
String | Array protected

Defined in `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 `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 `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 `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 `color/js/color-hsv.js:17`

Available since 3.8.0

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

### `STR_HSV`

String static

Defined in `color/js/color-hsv.js:26`

Available since 3.8.0

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

### `STR_HSVA`

String static

Defined in `color/js/color-hsv.js:35`

Available since 3.8.0

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