How do I _get_ the default clear color from code?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By falconfetus8

I see there’s a function called VisualServer.SetDefaultClearColor(), which lets me set the default background color. That’s cool and all, but is there a way for me to get the current background color? I know I can look in the project settings, but I want to get this value programmatically.

:bust_in_silhouette: Reply From: falconfetus8

It’s a little hacky, but you can get this value using the ProjectSettings class:

var c = (Color)ProjectSettings.GetSetting("rendering/environment/default_clear_color");

the path is now “rendering/environment/defaults/default_clear_color” btw