Struct ColorPicker

Color picker control.

struct ColorPicker ;

Control node displaying a color picker widget. It's useful for selecting a color from an RGB/RGBA colorspace.

Properties

NameTypeDescription
color[get, set] ColorThe currently selected color.
deferredMode[get, set] boolIf 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).
editAlpha[get, set] boolIf true, shows an alpha channel slider (transparency).
hsvMode[get, set] boolIf true, allows editing the color with Hue/Saturation/Value sliders. Note: Cannot be enabled if raw mode is on.
presetsEnabled[get, set] boolIf true, the "add preset" button is enabled.
presetsVisible[get, set] boolIf true, saved color presets are visible.
rawMode[get, set] boolIf true, 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). Note: Cannot be enabled if HSV mode is on.

Methods

NameDescription
_addPresetPressed
_focusEnter
_focusExit
_hsvDraw
_htmlEntered
_htmlFocusExit
_presetInput
_sampleDraw
_screenInput
_screenPickPressed
_textTypeToggled
_updatePresets
_uvInput
_valueChanged
_wInput
addPreset 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.
arePresetsEnabled
arePresetsVisible
erasePreset Removes the given color from the list of color presets of this color picker.
getPickColor
getPresets Returns the list of colors in the presets of the color picker.
isDeferredMode
isEditingAlpha
isHsvMode
isRawMode
setDeferredMode
setEditAlpha
setHsvMode
setPickColor
setPresetsEnabled
setPresetsVisible
setRawMode