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.
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.
If true, it's possible to add presets under Swatches. If false, the button to add presets is disabled.
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 intensity slider. The intensity is applied as follows: convert the color to linear encoding, multiply it by 2 ** intensity, and then convert it back to nonlinear sRGB encoding.
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.
MODE_RGB = 0Allows editing the color with Red/Green/Blue sliders in sRGB color space.
MODE_HSV = 1Allows editing the color with Hue/Saturation/Value sliders.
MODE_RAW = 2MODE_LINEAR = 2Allows editing the color with Red/Green/Blue sliders in linear color space.
MODE_OKHSL = 3Allows editing the color with Hue/Saturation/Lightness sliders.
OKHSL is a new color space similar to HSL but that better match perception by leveraging the Oklab color space which is designed to be simple to use, while doing a good job at predicting perceived lightness, chroma and hue.
SHAPE_HSV_RECTANGLE = 0HSV Color Model rectangle color space.
SHAPE_HSV_WHEEL = 1HSV Color Model rectangle color space with a wheel.
SHAPE_VHS_CIRCLE = 2HSV Color Model circle color space. Use Saturation as a radius.
SHAPE_OKHSL_CIRCLE = 3HSL OK Color Model circle color space.
SHAPE_NONE = 4The color space shape and the shape select button are hidden. Can't be selected from the shapes popup.
SHAPE_OK_HS_RECTANGLE = 5OKHSL Color Model rectangle with constant lightness.
SHAPE_OK_HL_RECTANGLE = 6OKHSL Color Model rectangle with constant saturation.