Constructs a new HSV color.
The hue component, in the range [0, 360].
The saturation component, in the range [0, 100].
The value (brightness) component, in the range [0, 100].
The alpha (opacity) component, in the range [0, 1]. Defaults to 1.
Returns the HSV color as an array of numbers.
An array containing the hue, saturation, value, and alpha components.
Converts the color to a hexadecimal string.
The hexadecimal representation of the color.
Returns the color as a string representation.
A string representation of the color.
Adjusts the brightness of the color.
The brightness adjustment value.
A new RGB color with adjusted brightness.
Creates a new HSV color that is a copy of the current color.
A new HSV color that is a clone of the current color.
Adjusts the contrast of the color.
The contrast adjustment value.
A new RGB color with adjusted contrast.
Darkens the color by a given value.
The amount to darken the color.
A new RGB color that is darkened.
Fades the color by a given value.
The amount to fade the color by, in the range [0, 1].
A new HSV color with the alpha component faded by the given value.
Applies gamma correction to the color.
The gamma correction value.
A new RGB color with gamma correction applied.
Lightens the color by a given value.
The amount to lighten the color.
A new RGB color that is lightened.
Rotates the hue of the color by a given offset.
The amount to rotate the hue.
A new HSL color with the hue rotated.
Returns a new HSV color with the components rounded to the nearest integer.
A new HSV color with rounded components.
Saturates the color by a given ratio.
The ratio to saturate the color.
A new HSL color with increased saturation.
Sets the hue component of the color.
The new hue value, in the range [0, 360].
A new HSV color with the updated hue component.
Readonly
aThe alpha (opacity) component of the color, in the range [0, 1].
Readonly
hThe hue component of the color, in the range [0, 360].
Readonly
sThe saturation component of the color, in the range [0, 100].
Readonly
vThe value (brightness) component of the color, in the range [0, 100].
Static
HSLThe HSL color model.
Static
HSVThe HSV color model.
Static
parseParses a color from a string or another Color instance.
Static
RGBThe RGB color model.
Represents a color in the HSV (Hue, Saturation, Value) color space. Extends the base
Color
class.