Color picker control.
    public class ColorPicker : BoxContainer

This is a simple color picker Control. 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.

Properties

    public Color Color { get; set; }

The currently selected color.

    public bool EditAlpha { get; set; }

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

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

Methods

    public void AddPreset(Color color)

Adds the current selected to color to a list of colors (presets), the presets will be displayed in the color picker and the user will be able to select them, notice that the presets list is only for this color picker.

    public Color GetPickColor()

Getter for Color

    public bool IsEditingAlpha()

Getter for EditAlpha

    public bool IsRawMode()

Getter for RawMode

    public void SetEditAlpha(bool show)

Setter for EditAlpha

    public void SetPickColor(Color color)

Setter for Color

    public void SetRawMode(bool mode)

Setter for RawMode

Tags: