Set the color of the Label text in GDScript

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Schweini
:bust_in_silhouette: Reply From: wombatstampede

How about using the search function?
here:
https://forum.godotengine.org/13961/how-do-you-change-the-font-text-color-in-a-label-from-code?show=13961#q13961

It’s a shame you’re being downvoted. This forum is riddled with daft questions that a quick google will answer. And this user couldn’t even be bothered to put which version of Godot or a question body.

SteveSmith | 2022-10-04 12:17

:bust_in_silhouette: Reply From: Gatada

My preferred approach for Godot 4:

$YourLabel.set("theme_override_colors/font_color", Color(1, 0, 0))

More details in duplicate question: https://forum.godotengine.org/13961/how-do-you-change-the-font-text-color-in-a-label-from-code?show=139924#a139924

1 Like