ColorUtil
Constructor Summary
Public Constructor | ||
public |
|
Method Summary
Public Methods | ||
public |
extractHsv(colorString: String): {"h": *, "s": *, "v": *} Utility function to extract h,s and v from a color string. |
|
public |
formatColorString(color: String, format: String): * Utility function to convert a color into a desired format. |
|
public |
Utility function to extract hue. |
|
public |
getValidFormats(formats: Array): * Utility function to validate given formats in supported formats and return a list of formats. |
|
public |
toHslString(hue: String, colorString: String): * Utility function to convert a color to Hsl string. |
|
public |
toHsvString(hue: String, colorString: String): * Utility function to convert a color to Hsv string. |
Public Constructors
public constructor() source
Public Methods
public extractHsv(colorString: String): {"h": *, "s": *, "v": *} source
Utility function to extract h,s and v from a color string.
Params:
Name | Type | Attribute | Description |
colorString | String | The color string |
Return:
{"h": *, "s": *, "v": *} |
public formatColorString(color: String, format: String): * source
Utility function to convert a color into a desired format.
Return:
* |
public getHue(colorString: String): * source
Utility function to extract hue.
Params:
Name | Type | Attribute | Description |
colorString | String | The color string |
Return:
* |
public getValidFormats(formats: Array): * source
Utility function to validate given formats in supported formats and return a list of formats. Any invalid/unsupported format is ignored.
Params:
Name | Type | Attribute | Description |
formats | Array | An array of formats to validate |
Return:
* |