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

Category: Core

Brief Description

Color picker control.

Member Functions

void add_preset ( Color arg0 )
Color get_color ( ) const
bool is_editing_alpha ( ) const
bool is_raw_mode ( ) const
void set_color ( Color color )
void set_edit_alpha ( bool show )
void set_raw_mode ( bool mode )


  • color_changed ( Color color )

Emitted when the color is changed.


This is a simple color picker Control. It’s useful for selecting a color from an RGB/RGBA colorspace.

Member Function Description

  • void add_preset ( Color arg0 )

Adds the current selected to color to a list of colors (presets), the presets will be displayed in the color picker and the user will be able to select them, notice that the presets list is only for this color picker.

  • Color get_color ( ) const

Return the current (edited) color.

  • bool is_editing_alpha ( ) const

Returns whether the color has transparency or not.

  • bool is_raw_mode ( ) const

Returns whether this color picker is in raw mode or not, raw mode will allow the color R, G, B component values to go beyond 1, you have to consider that the max value for color components is 1, going beyond that value will not have effect in the color, but can be used for special operations that require it (like tinting without darkening or rendering sprites in HDR).

  • void set_color ( Color color )

Select the current color.

  • void set_edit_alpha ( bool show )

Set true if you want the color to have an alpha channel (transparency), or false if you want a solid color.

  • void set_raw_mode ( bool mode )

Set whether this color picker is using raw mode or not, see is_raw_mode.