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

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

# Panel.BackgroundColor

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

## BackgroundColor

Gets or sets the color of the panel background.

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
panel.BackgroundColor: Color
```

### Returns

`Color` — 

### Examples

C#:

```csharp
var panel = new StackPanel { BackgroundColor = Color.FromHex("#80000000") };
panel.AddChild(new TextBlock { Text = "Semi transparent background", Margin = 5 });
Chart.AddControl(panel);
```

Python:

```python
panel = StackPanel()
panel.BackgroundColor = Color.FromHex("#80000000")
textBlock = TextBlock()
textBlock.Text = "Semi transparent background"
panel.AddChild(textBlock)
api.Chart.AddControl(panel)
```

