.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead. .. _class_ColorPicker: ColorPicker =========== **Inherits:** :ref:`BoxContainer` **<** :ref:`Container` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Color picker control. Member Functions ---------------- +----------------------------+-------------------------------------------------------------------------------------------------------+ | void | :ref:`add_preset` **(** :ref:`Color` color **)** | +----------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`get_pick_color` **(** **)** const | +----------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_editing_alpha` **(** **)** const | +----------------------------+-------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_raw_mode` **(** **)** const | +----------------------------+-------------------------------------------------------------------------------------------------------+ | void | :ref:`set_edit_alpha` **(** :ref:`bool` show **)** | +----------------------------+-------------------------------------------------------------------------------------------------------+ | void | :ref:`set_pick_color` **(** :ref:`Color` color **)** | +----------------------------+-------------------------------------------------------------------------------------------------------+ | void | :ref:`set_raw_mode` **(** :ref:`bool` mode **)** | +----------------------------+-------------------------------------------------------------------------------------------------------+ Signals ------- - **color_changed** **(** :ref:`Color` color **)** Emitted when the color is changed. Description ----------- This is a simple color picker :ref:`Control`. It's useful for selecting a color from an RGB/RGBA colorspace. Member Function Description --------------------------- .. _class_ColorPicker_add_preset: - void **add_preset** **(** :ref:`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. .. _class_ColorPicker_get_pick_color: - :ref:`Color` **get_pick_color** **(** **)** const Gets the current color. .. _class_ColorPicker_is_editing_alpha: - :ref:`bool` **is_editing_alpha** **(** **)** const Returns whether the color has transparency or not. .. _class_ColorPicker_is_raw_mode: - :ref:`bool` **is_raw_mode** **(** **)** const Returns whether this color picker is in raw mode or not, raw mode will allow the color R, G, B component values to go beyond 1, you have to consider that the max value for color components is 1, going beyond that value will not have effect in the color, but can be used for special operations that require it (like tinting without darkening or rendering sprites in HDR). .. _class_ColorPicker_set_edit_alpha: - void **set_edit_alpha** **(** :ref:`bool` show **)** Set true if you want the color to have an alpha channel (transparency), or false if you want a solid color. .. _class_ColorPicker_set_pick_color: - void **set_pick_color** **(** :ref:`Color` color **)** Select the current color. .. _class_ColorPicker_set_raw_mode: - void **set_raw_mode** **(** :ref:`bool` mode **)** Set whether this color picker is using raw mode or not, see :ref:`is_raw_mode`.