# Colors

Names, #hex, up and down, and colors that change per bar.

- Names: green, red, blue, orange, purple, yellow, teal, pink, grey, white, aqua, lime, fuchsia, maroon, navy, olive, silver, black.
- `#rrggbb`, or `#rrggbbaa` with transparency (`#26a69a40` is a quarter solid).
- `up` and `down` are your candle colors, so they follow your theme.
- A color may be a formula, picking one per bar: `color = x > 0 ? up : down`.
- Every plotted color is also a setting on the Style tab.

```vex
name("Colored", where = chart)

fast = ema(close, 9)
slow = ema(close, 21)
plot(fast, color = fast > slow ? #00ff00 : #ff0000)
plot(slow, color = fast > slow ? #00ff00 : #ff0000)
fill(fast, slow, color = fast > slow ? #00ff00 : #ff0000, opacity = 30)
bar_color(fast > slow ? up : down)
```

See also: [fill](/documentation/vex/reference/drawing#fill), [bar_color](/documentation/vex/reference/drawing#bar-color), [background](/documentation/vex/reference/drawing#background)
