Change Splash Screen background color in script

Hi, I’m making an app for mobile and the user is able to change their color theme in the app to dark or white mode. Now, depending on their color theme, I want to change the splash screen background. So if they use white mode the splash screen background is white, if they have dark mode it sets the splash screen background color to black.

Something I found that could be used is RuntimeInitializeLoadType.BeforeSplashScreen like this:

[RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.BeforeSplashScreen)]
private static void BeforeSplashScreen() {
    //This code will run before the splash screen
}

This function runs before the splash screen happens. The only problem is that I can’t find a way to change the background of the splash screen. The only thing I could find was PlayerSettings.SplashScreen.backgroundColor = Color.white; but this only works in the editor. If I try to build my app it gives me this error error CS0103: The name 'PlayerSettings' does not exist in the current context

Any ideas on how I can change the splash screen background color in script?

The Splash screen background colour can not be changed in the player, there is no public API for this. You could create your own splash screen using a scene and play this after the normal splash, you could then change the background in this one.