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

# RgbColor

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

## Classes

### RgbColor

#### Extends

#### Implements

- [`IRgbColor`](#irgbcolor)

#### Constructors

##### Constructor

```ts
new RgbColor(value?): RgbColor;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `value?` | `string` \| [`IRgbColor`](#irgbcolor) |

###### Returns

[`RgbColor`](#rgbcolor)

###### Overrides

```ts
Color.constructor
```

#### Properties

##### preview

```ts
preview: string = null;
```

###### Implementation of

[`IRgbColor`](#irgbcolor).[`preview`](#preview-1)

###### Inherited from

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

##### profileId

```ts
profileId: string = null;
```

###### Implementation of

[`IRgbColor`](#irgbcolor).[`profileId`](#profileid-1)

###### Inherited from

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

#### Accessors

##### a

###### Get Signature

```ts
get a(): number;
```

###### Returns

`number`

###### Set Signature

```ts
set a(value): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | `number` |

###### Returns

`void`

###### Implementation of

[`IRgbColor`](#irgbcolor).[`a`](#a-1)

##### alpha

###### Get Signature

```ts
get alpha(): number;
```

###### Returns

`number`

###### Overrides

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

##### b

###### Get Signature

```ts
get b(): number;
```

###### Returns

`number`

###### Set Signature

```ts
set b(value): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | `number` |

###### Returns

`void`

###### Implementation of

[`IRgbColor`](#irgbcolor).[`b`](#b-1)

##### g

###### Get Signature

```ts
get g(): number;
```

###### Returns

`number`

###### Set Signature

```ts
set g(value): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | `number` |

###### Returns

`void`

###### Implementation of

[`IRgbColor`](#irgbcolor).[`g`](#g-1)

##### previewFromServer

###### Get Signature

```ts
get previewFromServer(): boolean;
```

###### Returns

`boolean`

###### Inherited from

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

##### r

###### Get Signature

```ts
get r(): number;
```

###### Returns

`number`

###### Set Signature

```ts
set r(value): void;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `value` | `number` |

###### Returns

`void`

###### Implementation of

[`IRgbColor`](#irgbcolor).[`r`](#r-1)

##### type

###### Get Signature

```ts
get type(): string;
```

###### Returns

`string`

###### Implementation of

[`IRgbColor`](#irgbcolor).[`type`](#type-1)

###### Overrides

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

#### Methods

##### clone()

```ts
clone(): RgbColor;
```

###### Returns

[`RgbColor`](#rgbcolor)

###### Overrides

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

##### equals()

```ts
equals(other): boolean;
```

###### Parameters

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

###### Returns

`boolean`

###### Overrides

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

##### getData()

```ts
getData(): IRgbColor;
```

###### Returns

[`IRgbColor`](#irgbcolor)

###### Overrides

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

##### needUpdate()

```ts
needUpdate(defaultRgbProfileId): boolean;
```

###### Parameters

| Parameter | Type |
| ------ | ------ |
| `defaultRgbProfileId` | `string` |

###### Returns

`boolean`

###### Inherited from

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

##### toString()

```ts
toString(): string;
```

###### Returns

`string`

###### Overrides

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

##### equals()

```ts
static equals(a, b): boolean;
```

###### Parameters

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

###### Returns

`boolean`

###### Inherited from

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

##### matchRgb()

```ts
static matchRgb(string): RegExpExecArray;
```

###### Parameters

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

###### Returns

`RegExpExecArray`

##### matchRgba()

```ts
static matchRgba(string): RegExpExecArray;
```

###### Parameters

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

###### Returns

`RegExpExecArray`

## Interfaces

### IRgbColor

#### Extends

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

#### Properties

##### a?

```ts
optional a?: number;
```

##### b

```ts
b: number;
```

##### g

```ts
g: number;
```

##### preview?

```ts
optional preview?: string;
```

###### Inherited from

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

##### profileId?

```ts
optional profileId?: string;
```

###### Inherited from

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

##### r

```ts
r: number;
```

##### type?

```ts
optional type?: string;
```

###### Inherited from

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