Splash background color

When changing the splash logo balena-logo.png file inside the boot partition, it correctly gets displayed in place of the green balena logo on boot

However, it’s always displayed on a white background. This means that in order to display a white logo on black background, I need to make my image non-transparent, with a black background.

This works fine if I know the aspect ratio of the screen in advance. However, when the aspect ratio is different, white borders appear at the top and bottom or sides depending on the screen.

Is there a way to configure the splash screen background color, or have the image resize (while keeping the aspect ratio) to cover the whole screen? This would crop some parts of the image when the aspect ratio is different, but it’s totally acceptable in my case.

Thanks!

EDIT: found this theme script that basically defines the splash screen. Can we override this script with a custom one from the boot partition, just like we do with the png?

Hey there! The white background color is hardcoded in meta-balena as part of the Plymouth theme we have there, as you have already noticed. I never did this myself, but I think you should be able to edit the script file in-place to change the background color, or build a custom balenaOS image in the worst case.

Thanks for the quick reply!

I tried editing the script under /usr/share/plymouth/themes/balena but it says it’s a “read-only file system”.

Good idea though, thanks for the suggestion! I won’t go as far as building a custom image for this small cosmetic change, but maybe as a suggestion you could expose this color as a device/app setting?

Hey there! The partition is mounted as read-only. You can, with enough care, remount it as read-write while the device is running, but I also suggest downloading a balenaOS image from the website, making the customisations you need from within the development computer, and then flashing the modified image to the devices

I agree it would make sense to expose this as an option. I’ll raise that suggestion with the rest of the team!

Thanks again @jviotti , I’ll see if I find a way to mount the image on my Windows computer in order to edit the files. Worst case I’ll find a linux machine somewhere :slight_smile: