How to make splash background color dynamic?

Is it possible to set the splash background color according to the color scheme?

Hello, I am using it in the following way in my app “app.config.js” from SDK44, I leave a partial example with the minimum attributes:


const LIGHT_SPLASH = {
  image: './assets/splash-dark-content.png',
  backgroundColor: '#FFFFFF',
};

const DARK_SPLASH = {
  image: './assets/splash-soft-white-content.png',
  backgroundColor: '#000000',
};

const SHARED_SPLASH = {
  splash: {
    ...LIGHT_SPLASH,
    dark: {
      ...DARK_SPLASH,
    },
  },
};

export default {
  splash: LIGHT_SPLASH,
  ios: {
    ...SHARED_SPLASH,
  },
  android: {
    ...SHARED_SPLASH,
  },
};
2 Likes

Hi @gloredo and @outatime

See Brent’s comments here for a possible way to do it:

1 Like

Hi @outatime, thank you very much! It works! I just don’t understand how hahah, I didn’t find anything about the “dark” param in the docs.

If true there isn’t much documentation, but @notbrent referenced this, here are the source codes in case you want to check,

1 Like