# ColorProperty

> Draw a property field for a color shader property.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

## ColorProperty(MaterialProperty, string)

Draw a property field for a color shader property.

```csharp
public Color ColorProperty(MaterialProperty prop, string label)
```

### Parameters

**** (\[MaterialProperty]\(/engine/6000.0/script-reference/unityeditor/materialproperty)): **** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Label for the property.

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [Color](/engine/6000.0/script-reference/unityengine/color.md) |             |

## ColorProperty(Rect, MaterialProperty, string)

Draw a property field for a color shader property.

```csharp
public Color ColorProperty(Rect position, MaterialProperty prop, string label)
```

### Parameters

**** (\[Rect]\(/engine/6000.0/script-reference/unityengine/rect)): **** (\[MaterialProperty]\(/engine/6000.0/script-reference/unityeditor/materialproperty)): **** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Label for the property.

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [Color](/engine/6000.0/script-reference/unityengine/color.md) |             |

## ColorProperty(string, string)

Draw a property field for a color shader property.

> **Warning:**
>
> **Deprecated.** Use ColorProperty with MaterialProperty instead.

```csharp
public Color ColorProperty(string propertyName, string label)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Label for the property.

### Returns

| Type                                                          | Description |
| ------------------------------------------------------------- | ----------- |
| [Color](/engine/6000.0/script-reference/unityengine/color.md) |             |
