Skip to main content
Version: 1.x

@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

ConstructorModifiersDescription
(constructor)(hue, sat, val)Constructs a new instance of the ColorHSV class

Properties

PropertyModifiersTypeDescription
hnumber
snumber
vnumber

Methods

MethodModifiersDescription
equalValue(rhs)Determines if a color is equal to another
fromObject(data)staticConstruct 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.