---
id: fast-colors.colorlab.fromobject
title: ColorLAB.fromObject() method
hide_title: true
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[@microsoft/fast-colors](./fast-colors.md) &gt; [ColorLAB](./fast-colors.colorlab.md) &gt; [fromObject](./fast-colors.colorlab.fromobject.md)

## ColorLAB.fromObject() method

Construct a [ColorLAB](./fast-colors.colorlab.md) from a config object.

<b>Signature:</b>

```typescript
static fromObject(data: {
        l: number;
        a: number;
        b: number;
    }): ColorLAB | null;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  data | { l: number; a: number; b: number; } |  |

<b>Returns:</b>

[ColorLAB](./fast-colors.colorlab.md) \| null
