How to change the color of all texts in theme editor?

Godot Version

v4.2.2.stable

Question

So, I want to make a custom theme for the whole game. And I want to change the color for all text from black to, let’s say, green. Is there a way to change it in one place that is parent for any type of text? Or do I have to change color in the label type, then in button type and so on and so on, manually for all of the types? Because I haven’t found any proofs of any other ways than manually work with each type

I totally do not understand something about it :frowning:

I think it’s possible to do this with only a theme, you can study of it on docs

I’ve read all the docks and haven’t found a single hint for the solution

You can edit the theme.tres file. First make a theme of all the types you want and their properties you want to change. Save the theme and then open it up in a text editor such as Sublime or VSCode.

Will look something like this:

[resource]
default_font = SubResource("SystemFont_hs86w")
default_font_size = 20
Button/colors/font_color = Color(1, 0, 0, 1)
Button/colors/font_disabled_color = Color(0, 1, 0, 1)
Button/colors/font_focus_color = Color(0, 0, 0, 1)
Button/colors/font_hover_color = Color(0, 0, 1, 1)
CheckBox/colors/font_color = Color(0, 0, 0, 1)
CheckBox/colors/font_disabled_color = Color(0, 0, 0, 1)
CheckBox/colors/font_focus_color = Color(0, 0, 0, 1)
CheckBox/colors/font_hover_color = Color(0, 0, 0, 1)

Then using regular expression replace all the properties of all the types to what you want

For example to make all the font_colors properties to red use this:

Replace this:
font_color = (.*)

with this:
font_color = Color(1, 0, 0, 1)

Save the file after you are done and use it in your application.