Transparency and opacity

I guess I’m having a bit of trouble with transparencies and opacities.

What I’m trying do is to have an application that has a background.
On top of it several “screens” with transparent backgrounds fly in and out.
The way this was achieved was by using a single screen and then having widgets that get hidden and made visible whenever a new “screen” is requested.
All works fine: fast, absolutely no problem.

The problem appears when opacity of widgets on top needs to be changed to a value that isn’t 255 - everything that isn’t 255 is treated as 0.
If I understand correctly, in order to make possible, LV_COLOR_SCREEN_TRANSP needs to be set to 1 - as we are drawing on top of widgets with transparent backgrounds.

This also works fine IF display driver is using full screen refresh, otherwise display goes all mental.
But configuring driver for full screen also makes things quite slow and busy.

The question here is if there a better way to achieve the same sort of thing.
Maybe this is a long way around.
Any ideas?

Thanks in advance

In case some one is wondering.
A few experiences seem to show that a similar effect can be achieved by using masks.
These don’t require LV_COLOR_SCREEN_TRANSP and therefore don’t have problems with screen refresh. This also means that it performs better.

Any other ideas would be most welcome.


I unfortunately am facing the same issue.
I want to fade in some object using animations and it doesn’t work
Anything below opacity of 255 does not appear at all.

Hi, yes.
Should work if you enable LV_COLOR_SCREEN_TRANSP but it will get much slower.
Other option is to go with masks.
Still wondering if there are other approaches out there.


Right but then you need color depth to be 32 bit.
Im running LVGL and my display at 16 bit so it makes no sense to do this.
Min v7.x it worked flawlessly with no issues.

I’d be extremely interested on whatever you may find.


Also, I did have opacity working on v8.1, specifically on LED objects, but I’m not using them anymore so it won’t be an easy test for me.
Something seems off to me.

Ive found the issue on my end - I had v8.1 files in my local build for some reason.
V8.3 will fix this