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

> Maps a color to the measure when used as a series in a visualization.

This allows you to maintain consistent coloring for the measure across visualizations.

<Tip>
  You can also model colors for [dimensions](/modeling/dimensions/parameters/colors)!
</Tip>

## Syntax

```yaml theme={null}
<measure_name>:
  colors:
    series: <color>
```

## Properties

<ParamField path="measure_name" type="object[]">
  The name of the measure.

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

      <Expandable title="measure_name properties" defaultOpen="true">
        <ParamField path="series" type="string">
          The color to be used in visualizations when the measure is used as a series. Can be specified using any legal [CSS method](https://www.w3schools.com/cssref/css_colors_legal.php).
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

## Examples

```yaml title="Named color" theme={null}
first_order_date:
  colors:
    series: green
```

```yaml title="RGB color" theme={null}
first_order_date:
  colors:
    series: rgb(0, 0, 255)
```

```yaml title="RGBA with opacity" theme={null}
first_order_date:
  colors:
    series: rgba(0, 0, 255, 0.3)
```

```yaml title="HSL color" theme={null}
first_order_date:
  colors:
    series: hsl(120, 100%, 50%)
```

```yaml title="Hex color (must be quoted)" theme={null}
first_order_date:
  colors:
    series: "#000000"
```
