---
id: "M:cAlgo.API.OptimizationColorParameter.#ctor(System.String,cAlgo.API.Color)"
kind: "constructor"
type: "T:cAlgo.API.OptimizationColorParameter"
url: "https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationColorParameter/Constructor/"
---

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

# OptimizationColorParameter constructor

Member of [OptimizationColorParameter](https://help.ctrader.com/ctrader-algo/references/Plugin/Optimization/OptimizationColorParameter/index.md).

## OptimizationColorParameter(string name, Color value)

Holds the parameter fixed at the given value.

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

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

C#:

```csharp
public OptimizationColorParameter(string name, Color value)
```

Python:

```python
OptimizationColorParameter(name: str, value: Color)
```

### Parameters

- `name` (`string`, Python `str`): The cBot parameter name.
- `value` (`Color`, Python `Color`): The fixed value.

Available since cAlgo.API 5.9.

### Examples

C#:

```csharp
var parameter = new OptimizationColorParameter("LineColor", Color.FromHex("#FF2F4BFF"));
Print("{0} = {1}", parameter.Name, parameter.Value);
```

Python:

```python
parameter = OptimizationColorParameter("LineColor", Color.FromHex("#FF2F4BFF"))
api.Print(f"{parameter.Name} = {parameter.Value}")
```

## OptimizationColorParameter(OptimizationColorParameter original)



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

- CLI: Available to plugins only, and plugins cannot run in the CLI.
- Cloud: Available to plugins only, and plugins cannot run in the cloud.

C#:

```csharp
public OptimizationColorParameter(OptimizationColorParameter original)
```

Python:

```python
OptimizationColorParameter(original: OptimizationColorParameter)
```

### Parameters

- `original` (`OptimizationColorParameter`, Python `OptimizationColorParameter`):

Available since cAlgo.API 5.9.

