---
id: fast-colors.colorhsl
title: ColorHSL class
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-colors](./fast-colors.md) &gt; [ColorHSL](./fast-colors.colorhsl.md)

## ColorHSL 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.

<b>Signature:</b>

```typescript
export declare class ColorHSL 
```

## Constructors

|  Constructor | Modifiers | Description |
|  --- | --- | --- |
|  [(constructor)(hue, sat, lum)](./fast-colors.colorhsl._constructor_.md) |  | Constructs a new instance of the <code>ColorHSL</code> class |

## Properties

|  Property | Modifiers | Type | Description |
|  --- | --- | --- | --- |
|  [h](./fast-colors.colorhsl.h.md) |  | number |  |
|  [l](./fast-colors.colorhsl.l.md) |  | number |  |
|  [s](./fast-colors.colorhsl.s.md) |  | number |  |

## Methods

|  Method | Modifiers | Description |
|  --- | --- | --- |
|  [equalValue(rhs)](./fast-colors.colorhsl.equalvalue.md) |  | Determines if a color is equal to another |
|  [fromObject(data)](./fast-colors.colorhsl.fromobject.md) | <code>static</code> | Construct a [ColorHSL](./fast-colors.colorhsl.md) from a config object. |
|  [roundToPrecision(precision)](./fast-colors.colorhsl.roundtoprecision.md) |  | Returns a new [ColorHSL](./fast-colors.colorhsl.md) rounded to the provided precision |
|  [toObject()](./fast-colors.colorhsl.toobject.md) |  | Returns the [ColorHSL](./fast-colors.colorhsl.md) formatted as an object. |
