Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

ColorPicker

Inherits: VBoxContainer < BoxContainer < Container < Control < CanvasItem < Node < Object

A widget that provides an interface for selecting or modifying a color.

Description

A widget that provides an interface for selecting or modifying a color. It can optionally provide functionalities like a color sampler (eyedropper), color modes, and presets.

Note: This control is the color picker widget itself. You can use a ColorPickerButton instead if you need a button that brings up a ColorPicker in a popup.

Tutorials

Properties

bool

can_add_swatches

true

Color

color

Color(1, 1, 1, 1)

ColorModeType

color_mode

0

bool

color_modes_visible

true

bool

deferred_mode

false

bool

edit_alpha

true

bool

hex_visible

true

PickerShapeType

picker_shape

0

bool

presets_visible

true

bool

sampler_visible

true

bool

sliders_visible

true

Methods

void

add_preset ( Color color )

void

add_recent_preset ( Color color )

void

erase_preset ( Color color )

void

erase_recent_preset ( Color color )

PackedColorArray

get_presets ( ) const

PackedColorArray