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

Color

color

Color( 1, 1, 1, 1 )

Property Descriptions

Color color

Default

Color( 1, 1, 1, 1 )

Setter

set_frame_color(value)

Getter

get_frame_color()

The fill color.

$ColorRect.color = Color(1, 0, 0, 1) # Set ColorRect's color to red.

© 2014–2021 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
https://docs.godotengine.org/en/3.3/classes/class_colorrect.html