Color picker control.
    public class ColorPicker : BoxContainer

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

Inheritance Chain

Constructors

    public ColorPicker()

Signals

    "color_changed" (Color color)

Emitted when the color is changed.

    "preset_added" (Color color)

Emitted when a preset is added.

    "preset_removed" (Color color)

Emitted when a preset is removed.

Properties

    public Color Color { get; set; }

The currently selected color.

    public bool DeferredMode { get; set; }

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).

    public bool EditAlpha { get; set; }

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

    public bool HsvMode { get; set; }

If true, allows editing the color with Hue/Saturation/Value sliders.

Note: Cannot be enabled if raw mode is on.

    public bool PresetsEnabled { get; set; }

    public bool PresetsVisible { get; set; }

    public bool RawMode { get; set; }

If 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

    public void AddPreset(Color color)

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.

    [Obsolete("ArePresetsEnabled is deprecated. Use the PresetsEnabled property instead.")]
    public bool ArePresetsEnabled()

Getter for PresetsEnabled

    [Obsolete("ArePresetsVisible is deprecated. Use the PresetsVisible property instead.")]
    public bool ArePresetsVisible()

Getter for PresetsVisible

    public void ErasePreset(Color color)

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

    [Obsolete("GetPickColor is deprecated. Use the Color property instead.")]
    public Color GetPickColor()

Getter for Color

    public Color[] GetPresets()

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

    [Obsolete("IsDeferredMode is deprecated. Use the DeferredMode property instead.")]
    public bool IsDeferredMode()

Getter for DeferredMode

    [Obsolete("IsEditingAlpha is deprecated. Use the EditAlpha property instead.")]
    public bool IsEditingAlpha()

Getter for EditAlpha

    [Obsolete("IsHsvMode is deprecated. Use the HsvMode property instead.")]
    public bool IsHsvMode()

Getter for HsvMode

    [Obsolete("IsRawMode is deprecated. Use the RawMode property instead.")]
    public bool IsRawMode()

Getter for RawMode

    [Obsolete("SetDeferredMode is deprecated. Use the DeferredMode property instead.")]
    public void SetDeferredMode(bool mode)

Setter for DeferredMode

    [Obsolete("SetEditAlpha is deprecated. Use the EditAlpha property instead.")]
    public void SetEditAlpha(bool show)

Setter for EditAlpha

    [Obsolete("SetHsvMode is deprecated. Use the HsvMode property instead.")]
    public void SetHsvMode(bool mode)

Setter for HsvMode

    [Obsolete("SetPickColor is deprecated. Use the Color property instead.")]
    public void SetPickColor(Color color)

Setter for Color

    [Obsolete("SetPresetsEnabled is deprecated. Use the PresetsEnabled property instead.")]
    public void SetPresetsEnabled(bool enabled)

Setter for PresetsEnabled

    [Obsolete("SetPresetsVisible is deprecated. Use the PresetsVisible property instead.")]
    public void SetPresetsVisible(bool visible)

Setter for PresetsVisible

    [Obsolete("SetRawMode is deprecated. Use the RawMode property instead.")]
    public void SetRawMode(bool mode)

Setter for RawMode

Tags: