> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

# colors - Dimensions

> Defines colors to map to specific dimension values.

This allows you to maintain consistent coloring for dimension values across visualizations, whether they're on the same dashboard or on different dashboards.

> [!TIP]
>
> You can also model colors for [measures](https://docs.omni.co/modeling/measures/parameters/colors.md)!

## Syntax

```yaml theme={null}
<dimension_name>:
  colors:
    conditions:
      - condition:
          is: <value>
        color: <color>
    else: <fallback_color>
```

## Properties

**dimension\_name** `object`

The name of the dimension. Dimension names must:

* Be unique within the view
* Start with a letter
* Contain only alphanumeric characters and underscores

**dimension\_name properties**

**colors** `object`

Contains color configuration for the dimension.

**colors properties**

**conditions** `array`

A list of condition objects that map specific values to colors.

**conditions properties**

**condition** `object` *required*

A condition specified using [filter syntax](https://docs.omni.co/modeling/filters). Currently, only the `is:` syntax is supported. The condition must be a child of the `condition` key.

**color** `string` *required*

The color to be used in visualizations when the condition is met. Can be specified using any legal [CSS method](https://www.w3schools.com/cssref/css_colors_legal.php).

**else** `string`

Optional fallback color applied to values that don't meet any condition in the list.

## Examples

```yaml title="Multiple color conditions" theme={null}
status:
  order_by_field: status_order
  colors:
    conditions:
      - condition:
          is: Complete
        color: green
      - condition:
          is: Processing
        color: rgb(0, 0, 255)
      - condition:
          is: Pending
        color: rgba(0, 0, 255, 0.3)
      - condition:
          is: Shipped
        color: hsl(120, 100%, 50%)
      - condition:
          is: Cancelled
        color: "#000000"
    else: red
```

```yaml title="Simple color mapping" theme={null}
priority:
  colors:
    conditions:
      - condition:
          is: High
        color: red
      - condition:
          is: Low
        color: green
    else: gray
```
