---
id: "P:cAlgo.API.Border.BackgroundColor"
kind: "property"
type: "T:cAlgo.API.Border"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Border/BackgroundColor/"
---

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

# Border.BackgroundColor

Member of [Border](https://help.ctrader.com/ctrader-algo/references/Controls/Border/index.md).

## BackgroundColor

Gets or sets the color of the border background. Check the Color class for the ARGB (alpha, red, green, blue) color values, or use the strings Color.Red, Color.FromName("Red"), Color.FromArgb(255, 0, 0), Color.FromHex("#ff0000"), "Red", "#ff0000".

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

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

Python:

```python
border.BackgroundColor: Color
```

### Returns

`Color` — 

### Examples

C#:

```csharp
var border = new Border { BackgroundColor = Color.FromArgb(120, 0, 0, 0), Padding = 5 };
border.Child = new TextBlock { Text = SymbolName, ForegroundColor = Color.White };
Chart.AddControl(border);
```

Python:

```python
border = Border()
border.BackgroundColor = Color.FromArgb(120, 0, 0, 0)
border.Padding = Thickness(5)
textBlock = TextBlock()
textBlock.Text = api.SymbolName
textBlock.ForegroundColor = Color.White
border.Child = textBlock
api.Chart.AddControl(border)
```

