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.
Emitted when the color is changed.
Emitted when a preset is added.
Emitted when a preset is removed.
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.
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.
If true
, it's possible to add presets under Swatches. If false
, the button to add presets is disabled.
The currently selected color.
The currently selected color mode. See ColorModeType.
If true
, the color mode buttons are visible.
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).
If true
, shows an alpha channel slider (opacity).
If true
, the hex color code input field is visible.
The shape of the color space view. See PickerShapeType.
If true
, the Swatches and Recent Colors presets are visible.
If true
, the color sampler and color preview are visible.
If true
, the color sliders are visible.
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.
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.
Removes the given color from the list of color presets of this color picker.
Removes the given color from the list of color recent presets of this color picker.
Returns the list of colors in the presets of the color picker.
Returns the list of colors in the recent presets of the color picker.