---
id: "P:cAlgo.API.ChartHorizontalLine.Color"
kind: "property"
type: "T:cAlgo.API.ChartHorizontalLine"
url: "https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartHorizontalLine/Color/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# ChartHorizontalLine.Color

Member of [ChartHorizontalLine](https://help.ctrader.com/ctrader-algo/references/Chart/Drawings/ChartHorizontalLine/index.md).

## Color

Gets or sets the line color.

Environments: Desktop supported · CLI works differently · Cloud works differently.

- CLI: Created and kept with all its properties, but never drawn: the CLI displays no chart.
- Cloud: Created and kept with all its properties, but never drawn: the cloud displays no chart.

C#:

```csharp
Color Color {get; set;}
```

Python:

```python
chartHorizontalLine.Color: Color
```

### Returns

`Color` — 

### Examples

C#:

```csharp
var line = Chart.DrawHorizontalLine("support", Bars.LowPrices.LastValue, Color.Green);
line.Color = Bars.ClosePrices.LastValue < line.Y ? Color.Red : Color.Green;
Print("Support line color: {0}", line.Color);
```

Python:

```python
line = api.Chart.DrawHorizontalLine("support", api.Bars.LowPrices.LastValue, Color.Green)
line.Color = Color.Red if api.Bars.ClosePrices.LastValue < line.Y else Color.Green
api.Print(f"Support line color: {line.Color}")
```

