---
title: "ColorFactory | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/ColorFactory/"
---

# ColorFactory

> [`ColorFactory`](#colorfactory)

## Classes

### ColorFactory

#### Constructors

##### Constructor

```ts
new ColorFactory(): ColorFactory;
```

###### Returns

#### Accessors

##### rgbColorProfileId

###### Set Signature

```ts
set static rgbColorProfileId(value): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | `string` |

###### Returns

`void`

#### Methods

##### createColor()

```ts
static createColor(
   value, 
   throwException?, 
   attachRgbColorProfile?): Color;
```

###### Parameters

| Parameter | Type | Default value |
| ------ | ------ | ------ |
| `value` | \| `string` \| [`IColor`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/Color-1.md#icolor) \| [`Color`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/Color-1.md#abstract-color) | `undefined` |
| `throwException` | `boolean` | `false` |
| `attachRgbColorProfile` | `boolean` | `false` |

###### Returns

[`Color`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/Color-1.md#abstract-color)

##### registerColor()

```ts
static registerColor(
   typeName, 
   shortName, 
   colorConstructor): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `typeName` | `string` |
| `shortName` | `string` |
| `colorConstructor` | [`ColorConstructor`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-model/Color-1.md#colorconstructor) |

###### Returns

`void`
