Up to date
This page is up to date for Godot 4.3
.
If you still find outdated information, please open an issue.
ColorButton¶
Inherits: BaseButton < Control < CanvasItem < Node < Object
A Button That displays a color.
Description¶
A Button That displays a color.
Properties¶
|
||
|
||
|
Methods¶
void |
Theme Properties¶
Signals¶
Emitted when the color is changed.
Property Descriptions¶
Color color = Color(1, 1, 1, 1)
🔗
The button's display color.
If true
, shows an alpha channel slider (opacity).
Draws the buttons without the styles.
Method Descriptions¶
void set_color(color: Color) 🔗
Changes the button's color and emits color_changed.
Theme Property Descriptions¶
The background image displayed behind the color when the color alpha is less than one.
Texture2D overbright_indicator 🔗
The indicator used to signalize that the color value is outside the 0-1 range.
StyleBox used when the Button is disabled.
StyleBox used when the Button is focused. The focus StyleBox is displayed over the base StyleBox, so a partially transparent StyleBox should be used to ensure the base StyleBox remains visible. A StyleBox that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a StyleBoxEmpty resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
StyleBox used when the Button is being hovered.
StyleBox used when the Button is being pressed and hovered at the same time.
Default StyleBox for the Button.