# ColorUsageAttribute

> Attribute for Color fields. Used for configuring the GUI for the color.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEngine](/engine/6000.0/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

## ColorUsageAttribute(bool)

Attribute for Color fields. Used for configuring the GUI for the color.

```csharp
public ColorUsageAttribute(bool showAlpha)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): If false then the alpha channel info is hidden both in the ColorField and in the Color Picker.

## ColorUsageAttribute(bool, bool)

Attribute for Color fields. Used for configuring the GUI for the color.

```csharp
public ColorUsageAttribute(bool showAlpha, bool hdr)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): If false then the alpha channel info is hidden both in the ColorField and in the Color Picker.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Set to true if the color should be treated as a HDR color (default value: false).

## ColorUsageAttribute(bool, bool, float, float, float, float)

Attribute for Color fields. Used for configuring the GUI for the color.

> **Warning:**
>
> **Deprecated.** Brightness and exposure parameters are no longer used for anything. Use ColorUsageAttribute(bool showAlpha, bool hdr)

```csharp
public ColorUsageAttribute(bool showAlpha, bool hdr, float minBrightness, float maxBrightness, float minExposureValue, float maxExposureValue)
```

### Parameters

**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): If false then the alpha channel info is hidden both in the ColorField and in the Color Picker.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Set to true if the color should be treated as a HDR color (default value: false).**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Minimum allowed HDR color component value when using the HDR Color Picker (default value: 0).**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Maximum allowed HDR color component value when using the HDR Color Picker (default value: 8).**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Minimum exposure value allowed in the HDR Color Picker (default value: 1/8 = 0.125).**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Maximum exposure value allowed in the HDR Color Picker (default value: 3).
