> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# IColorMapping

- Package: [@gooddata/sdk-ui-vis-commons](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-vis-commons/index.md)
- Kind: interface
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-vis-commons/src/coloring/types.ts

**Signature:**

```typescript
export interface IColorMapping 
```

## Properties

| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [color](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-vis-commons/sdk-ui-vis-commons.icolormapping/index.md#icolormappingcolor) |  | [IColor](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-model/sdk-model.icolor/index.md) | Color to assign. |
| [id?](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-vis-commons/sdk-ui-vis-commons.icolormapping/index.md#icolormappingid) |  | string | _(Optional)_ Optional stable identifier of the mapped item. |
| [predicate](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-vis-commons/sdk-ui-vis-commons.icolormapping/index.md#icolormappingpredicate) |  | [IHeaderPredicate](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui/sdk-ui.iheaderpredicate/index.md) | Predicate function which will be called for each entity that will be charted. |

## Property details

### IColorMapping.color

Color to assign.

**Signature:**

```typescript
color: IColor;
```

#### Remarks

It is possible to assign color from colorPalette or provide custom color as RGB code.

### IColorMapping.id

Optional stable identifier of the mapped item.

**Signature:**

```typescript
id?: string;
```

#### Remarks

Consumers may use this to build stable fingerprints without depending on predicate function identity.

### IColorMapping.predicate

Predicate function which will be called for each entity that will be charted.

**Signature:**

```typescript
predicate: IHeaderPredicate;
```

#### Remarks

If matched, the `color` will assigned to that entity when it is rendered (be it as a bar, column, point, slice etc)
