@microsoft/fast-colors > ColorHSV

ColorHSV class

This uses Hue values in "degree" format. So expect a range of [0,360]. Some other implementations instead uses radians or a normalized Hue with range [0,1]. Be aware of this when checking values or using other libraries.

Signature:

export declare class ColorHSV 

Constructors

Constructor Modifiers Description
(constructor)(hue, sat, val) Constructs a new instance of the ColorHSV class

Properties

Property Modifiers Type Description
h number
s number
v number

Methods

Method Modifiers Description
equalValue(rhs) Determines if a color is equal to another
fromObject(data) static Construct a ColorHSV from a config object.
roundToPrecision(precision) Returns a new ColorHSV rounded to the provided precision
toObject() Returns the ColorHSV formatted as an object.