---
id: "T:cAlgo.API.ColorThemeChangeEventArgs"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/ColorThemeChangeEventArgs/"
---

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

# ColorThemeChangeEventArgs (class)

Provides data for the color theme change event.

Environments: Desktop supported · CLI supported · Cloud supported.

## Definition

```csharp
public class ColorThemeChangeEventArgs
```

## Examples

C#:

```csharp
using cAlgo.API;

namespace cAlgo
{
    // This example shows how to use the Chart ColorThemeChangeEventArgs
    public partial class ColorThemeChangeEventArgsSample : Indicator
    {
        protected override void Initialize()
        {
            Application.ColorThemeChanged += Application_ColorThemeChanged;
        }

        private void Application_ColorThemeChanged(ColorThemeChangeEventArgs obj)
        {
            var text = string.Format("Theme Changed To: {0}", obj.ColorTheme);

            Chart.DrawStaticText("text", text, VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red);
        }

        public override void Calculate(int index)
        {
        }
    }
}
```

Python:

```python
import clr
clr.AddReference("cAlgo.API")

from cAlgo.API import *

class Test():
    def initialize(self):
        api.Application.ColorThemeChanged += self.on_application_color_theme_changed

    def on_application_color_theme_changed(self, args):
        api.Chart.DrawStaticText("text", f"Theme Changed To: {args.ColorTheme}", VerticalAlignment.Top, HorizontalAlignment.Right, Color.Red)
```

config.json:

```json
{
  "AccessRights": "None",
  "TimeZone": "UTC",
  "IsOverlay": true
}
```

## Properties

- `public ColorTheme ColorTheme {get;}` — Gets the color theme. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/ColorThemeChangeEventArgs/ColorTheme/index.md)

