Godot Editor default color theme

Godot Version

4.2

Question

Just what the title says. Can anybody tell me what colors the Godot Editor uses as default?

I want to build a plug in and use the same colors.

The editor theme can be modified by the user so there’s not really a default color for it. If your plugin adds Controls to the editor and don’t specify a Theme they will inherit the current editor theme the user has set.

If you still want to get the current colors the editor Theme is using you can get them like this:

	var root = EditorInterface.get_base_control()
	print(root.get_theme_color("base_color", "Editor"))
	print(root.get_theme_color("accent_color", "Editor"))

I’m not sure if there’s a list of properties the editor uses somewhere else but you can see which colors you have access to by creating a Theme Resource and checking which properties you can import in Manage Items...

1 Like

Okay? Maybe I’m just imagining things.
It just doesn’t feel like my windows and panels have the same “look and feel” as the Godot Editor.

So I have looked at it and when I don’t use a ColorRect or set the Color of the Panels somewhere, my plugin has a greyish look to it.

But the Godot Editor has more of a very dark blue tone. That’s why I asked for the color that Godot uses.

Edit:
Forget what I said. I’m trippin. I just got confused between running the program and using it as a plugin, which has a big impact on what the plugin looks like.

When create a pop up though, I am stuck with the same problem. Well… whatever.

I may be a bit late here, but I found a solution. To get the editor theme base color you can use this line of code:

get_theme_color("base_color", "Editor")

Then you could apply that to a PanelContainer for example:

var new_stylebox:StyleBoxFlat = StyleBoxFlat.new()
new_stylebox.bg_color = get_theme_color("base_color", "Editor")
$PanelCon.add_theme_stylebox_override("panel", new_stylebox)

Results of this can be seen here