Legacy Documentation: Version 4.5.0

Script language:

  • JS
  • C#
  • Boo
Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

EditorGUIUtility.DrawColorSwatch

static function DrawColorSwatch(position: Rect, color: Color): void;
static void DrawColorSwatch(Rect position, Color color);
static def DrawColorSwatch(position as Rect, color as Color) as void

Parameters

positionThe rectangle to draw the color swatch within.
colorThe color to draw.

Description

Draw a color swatch.