@tempots/color
HSV class
Represents a color in the HSV (Hue, Saturation, Value) color model.
Signature:
declare class HSV
Constructors
Constructor |
Modifiers |
Description |
---|---|---|
Constructs a new instance of the |
Properties
Property |
Modifiers |
Type |
Description |
---|---|---|---|
|
(other: HSV, tollerance?: number) => boolean |
Checks if the current HSV color is equal to another HSV color. | |
|
(s: string) => HSV |
Creates an HSV color object from a string representation. The string should be in the format "hsv(h, s%, v%)" where h, s, and v are numeric values. | |
|
number |
Represents the hue value in the HSV color model. | |
|
([hue, saturation, value]: [hue: number, saturation: number, value: number]) => HSV |
Creates an HSV color from individual channel values. | |
|
number |
The saturation value of the HSV color model. | |
|
() => [number, number, number] |
Converts the HSV color representation to an array of channels. | |
|
() => string |
Returns a string representation of the HSV color. The format of the string is "hsv(hue, saturation, value)". | |
|
number |
The value component of the HSV color model. | |
|
(h: number) => HSV |
Returns a new HSV color with the specified hue value. | |
|
(s: number) => HSV |
Returns a new HSV color with the specified saturation. | |
|
(v: number) => HSV |
Returns a new HSV color with the specified value. |