---
id: fast-colors.colorhsl.fromobject
title: ColorHSL.fromObject() method
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) &gt; [fromObject](./fast-colors.colorhsl.fromobject.md)

## ColorHSL.fromObject() method

Construct a [ColorHSL](./fast-colors.colorhsl.md) from a config object.

<b>Signature:</b>

```typescript
static fromObject(data: {
        h: number;
        s: number;
        l: number;
    }): ColorHSL | null;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  data | { h: number; s: number; l: number; } |  |

<b>Returns:</b>

[ColorHSL](./fast-colors.colorhsl.md) \| null
