Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
ColorRect¶
Inherits: Control < CanvasItem < Node < Object
Colored rectangle.
Description¶
Displays a rectangle filled with a solid color. If you need to display the border alone, consider using ReferenceRect instead.
Tutorials¶
Properties¶
|
Property Descriptions¶
Color color = Color(1, 1, 1, 1)
The fill color.
$ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect's color to red.
GetNode<ColorRect>("ColorRect").Color = new Color(1, 0, 0, 1); // Set ColorRect's color to red.