For Godot 4 the property path has changed.
$YourLabel.set("theme_override_colors/font_color", Color(1, 0, 0))
However, the approach I used to find this answer might also be helpful:
- Find the property you want to set in the editor node Inspector.
- Right-click the property label and select
Copy Property Path
.
- Set the property on your node using the copied path:
<node>.set("<path>", <value>)
.
The challenge to understand which property to set remains. For example, I did not see the set color on my label because the Label Settings
was set.