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:

Making changes to the plymouth script file inside the balenaOS image file seems too difficult. Is there an easier way to achieve this?

I’m working on a project where I want to replace the default green balena logo with a custom splash screen during boot on my balenaOS devices. I’ve successfully replaced the balena-logo.png file in the boot partition, but I’m facing an issue with the splash screen’s background color and aspect ratio. The custom logo is displayed on a white background, which is not ideal for my design. The custom logo doesn’t resize dynamically based on the screen’s aspect ratio, causing white borders to appear at the edges. I’d like to configure the splash screen to have a black background and have the image resize while maintaining its aspect ratio, cropping any excess parts as needed.

  1. Replace the plymouth theme script file (as linked in the OP) inside the balenaOS image file.
  2. Build custom balenaOS

As far as I know, these are the only two options you have at the moment.
I’ve gone with option 1. It is definitely not ideal but easier than option 2.