class-description NEWS COMMUNITY STORE LABS SIGN UP LOGIN LOGOUT ROKOJORI NEWSLETTER SIGN UP LOGIN LOGOUT NEWS COMMUNITY STORE LABS TOGGLE FULLSCREEN VOLLBILD AN/AUS ObjectNodeCanvasItemControlContainerBoxContainerVBoxContainer ColorPicker
A widget that provides an interface for selecting or modifying a color.

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.

color_changed color_changed<>( Color color=, color:Color=, ):color_changed

Emitted when the color is changed.

preset_added preset_added<>( Color color=, color:Color=, ):preset_added

Emitted when a preset is added.

preset_removed preset_removed<>( Color color=, color:Color=, ):preset_removed

Emitted when a preset is removed.

Enum ColorModeType<>():Enum

MODE_RGB = 0

Allows editing the color with Red/Green/Blue sliders.


MODE_HSV = 1

Allows editing the color with Hue/Saturation/Value sliders.


MODE_RAW = 2

Allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR).


MODE_OKHSL = 3

Allows editing the color with Hue/Saturation/Lightness sliders.

Enum PickerShapeType<>():Enum

SHAPE_HSV_RECTANGLE = 0

HSV Color Model rectangle color space.


SHAPE_HSV_WHEEL = 1

HSV Color Model rectangle color space with a wheel.


SHAPE_VHS_CIRCLE = 2

HSV Color Model circle color space. Use Saturation as a radius.


SHAPE_OKHSL_CIRCLE = 3

HSL OK Color Model circle color space.


SHAPE_NONE = 4

The color space shape and the shape select button are hidden. Can't be selected from the shapes popup.

bool can_add_swatches<>():bool

If true, it's possible to add presets under Swatches. If false, the button to add presets is disabled.

Color color<>():Color

The currently selected color.

ColorModeType color_mode<>():ColorModeType

The currently selected color mode. See ColorModeType.

bool color_modes_visible<>():bool

If true, the color mode buttons are visible.

bool deferred_mode<>():bool

If true, the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues).

bool edit_alpha<>():bool

If true, shows an alpha channel slider (opacity).

bool hex_visible<>():bool

If true, the hex color code input field is visible.

PickerShapeType picker_shape<>():PickerShapeType

The shape of the color space view. See PickerShapeType.

bool presets_visible<>():bool

If true, the Swatches and Recent Colors presets are visible.

bool sampler_visible<>():bool

If true, the color sampler and color preview are visible.

bool sliders_visible<>():bool

If true, the color sliders are visible.

void add_preset<>( Color color=, color:Color=, ):void

Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them.

Note: The presets list is only for this color picker.

void add_recent_preset<>( Color color=, color:Color=, ):void

Adds the given color to a list of color recent presets so that it can be picked later. Recent presets are the colors that were picked recently, a new preset is automatically created and added to recent presets when you pick a new color.

Note: The recent presets list is only for this color picker.

void erase_preset<>( Color color=, color:Color=, ):void

Removes the given color from the list of color presets of this color picker.

void erase_recent_preset<>( Color color=, color:Color=, ):void

Removes the given color from the list of color recent presets of this color picker.

PackedColorArray get_presets<>():PackedColorArray

Returns the list of colors in the presets of the color picker.

PackedColorArray get_recent_presets<>():PackedColorArray

Returns the list of colors in the recent presets of the color picker.




All social media brands are registrated trademarks and belong to their respective owners.





CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
CONTACT IMPRINT TERMS OF USE PRIVACY © ROKOROJI ® 2021 rokojori.com
We are using cookies on this site. Read more... Wir benutzen Cookies auf dieser Seite. Mehr lesen...