> ## 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.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.omni.co/feedback

```json
{
  "path": "/modeling/dimensions/parameters/colors",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# colors

> 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](/modeling/measures/parameters/colors)!
</Tip>

## Syntax

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

## Properties

<ParamField path="dimension_name" type="object">
  The name of the dimension. Dimension names must:

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

  <Expandable title="dimension_name properties" defaultOpen="true">
    <ParamField path="colors" type="object">
      Contains color configuration for the dimension.

      <Expandable title="colors properties" defaultOpen="true">
        <ParamField path="conditions" type="array">
          A list of condition objects that map specific values to colors.

          <Expandable title="conditions properties" defaultOpen="true">
            <ParamField path="condition" type="object" required>
              A condition specified using [filter syntax](/modeling/filters). Currently, only the `is:` syntax is supported. The condition must be a child of the `condition` key.
            </ParamField>

            <ParamField path="color" type="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).
            </ParamField>
          </Expandable>
        </ParamField>

        <ParamField path="else" type="string">
          Optional fallback color applied to values that don't meet any condition in the list.
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

## 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
```
