ControlAddColorOverride Method |
Overrides the Color with given name in the Theme resource the control uses.
Note: Unlike other theme overrides, there is no way to undo a color override without manually assigning the previous color.
Example of overriding a label's color and resetting it later:
# Override the child node "MyLabel"'s font color to orange. $MyLabel.add_color_override("font_color", Color(1, 0.5, 0)) # Reset the color by creating a new node to get the default value: var default_label_color = Label.new().get_color("font_color") $MyLabel.add_color_override("font_color", default_label_color)
Namespace: Godot
public void AddColorOverride( string name, Color color )
[Missing <param name="name"/> documentation for "M:Godot.Control.AddColorOverride(System.String,Godot.Color)"]
[Missing <param name="color"/> documentation for "M:Godot.Control.AddColorOverride(System.String,Godot.Color)"]