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

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

# Window.BackgroundColor

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

## BackgroundColor

Get / Set the window background color

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

- CLI: Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire.
- Cloud: Never shown: Show, Hide and Close send nothing; IsVisible stays false and window events never fire.

C#:

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

Python:

```python
window.BackgroundColor: Color
```

### Returns

`Color` — 

### Examples

C#:

```csharp
var window = new Window { Title = "Dark window", Width = 300, Height = 200, BackgroundColor = Color.FromHex("#1E1E1E") };
window.Child = new TextBlock { Text = "Spread: " + Symbol.Spread / Symbol.PipSize, ForegroundColor = Color.White };
window.Show();
```

Python:

```python
window = Window()
window.Title = "Dark window"
window.Width = 300
window.Height = 200
window.BackgroundColor = Color.FromHex("#1E1E1E")
window.Show()
```

