# DrawColorSwatch(Rect, Color)

> Draw a color swatch.

## Definition

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

```csharp
public static void DrawColorSwatch(Rect position, Color color)
```

### Parameters

**** (\[Rect]\(/engine/6000.0/script-reference/unityengine/rect)): The rectangle to draw the color swatch within.**** (\[Color]\(/engine/6000.0/script-reference/unityengine/color)): The color to draw.
