# Screen with reduced alpha appears white instead transparent

**URL:** <http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616>\
**Category:** How to\
**Created:** [August 3, 2023, 1:35pm UTC](http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616 "2023-08-03T13:35:37Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Julien\_Nicola](http://forum.squareline.io/letter_avatar_proxy/v4/letter/j/f475e1/32.png) [@Julien\_Nicola](http://forum.squareline.io/u/Julien_Nicola)\
**Post date:** [August 3, 2023, 1:35pm UTC](http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616/1 "2023-08-03T13:35:37Z")

</div>

Hello,

I want to display a screen on another screen with a reduced alpha for background in order to see on the new screen only the center panel, like a modal window.

When I tried to do this the screen appear white insted of seeing the other screen.

Is there a way to do this ?

---

<div class="post-metadata">

**Author:** ![kisvegabor](http://forum.squareline.io/user_avatar/forum.squareline.io/kisvegabor/32/537_2.png) [@kisvegabor](http://forum.squareline.io/u/kisvegabor)\
**Post date:** [August 4, 2023, 10:04am UTC](http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616/2 "2023-08-04T10:04:54Z")

</div>

Hi,

You need to enable `LV_COLOR_SCREEN_TRANSP` in `lv_conf.h`.

---

<div class="post-metadata">

**Author:** ![Julien\_Nicola](http://forum.squareline.io/letter_avatar_proxy/v4/letter/j/f475e1/32.png) [@Julien\_Nicola](http://forum.squareline.io/u/Julien_Nicola)\
**Post date:** [August 4, 2023, 12:49pm UTC](http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616/3 "2023-08-04T12:49:50Z")

</div>

Hello,

It has changed the background color, now it appears black, but I do not see the previous screen in the background ?

---

<div class="post-metadata">

**Author:** ![Julien\_Nicola](http://forum.squareline.io/letter_avatar_proxy/v4/letter/j/f475e1/32.png) [@Julien\_Nicola](http://forum.squareline.io/u/Julien_Nicola)\
**Post date:** [August 4, 2023, 12:52pm UTC](http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616/4 "2023-08-04T12:52:43Z")

</div>

I use this function to change the screen.

C.\_ui\_screen\_change(C.ui\_UserConfirmationScreen, C.LV\_SCR\_LOAD\_ANIM\_FADE\_ON, 0, 0)

I think that the bakground is reloaded when the screen is changed

---

<div class="post-metadata">

**Author:** ![kisvegabor](http://forum.squareline.io/user_avatar/forum.squareline.io/kisvegabor/32/537_2.png) [@kisvegabor](http://forum.squareline.io/u/kisvegabor)\
**Post date:** [August 7, 2023, 8:45am UTC](http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616/5 "2023-08-07T08:45:16Z")

</div>

Normally the screens should fully convert the display. Have you changed e.g. the `bg_opa` of a screen to make the prevoius screen visible?

---

<div class="post-metadata">

**Author:** ![Julien\_Nicola](http://forum.squareline.io/letter_avatar_proxy/v4/letter/j/f475e1/32.png) [@Julien\_Nicola](http://forum.squareline.io/u/Julien_Nicola)\
**Post date:** [August 7, 2023, 12:07pm UTC](http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616/6 "2023-08-07T12:07:24Z")

</div>

YES BG color FFFFFF Alpha 0

---

<div class="post-metadata">

**Author:** ![Marian\_M](http://forum.squareline.io/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@Marian\_M](http://forum.squareline.io/u/Marian_M)\
**Post date:** [August 7, 2023, 12:10pm UTC](http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616/7 "2023-08-07T12:10:53Z")

</div>

You cant have two screens on display , you need two panels

---

<div class="post-metadata">

**Author:** ![Julien\_Nicola](http://forum.squareline.io/letter_avatar_proxy/v4/letter/j/f475e1/32.png) [@Julien\_Nicola](http://forum.squareline.io/u/Julien_Nicola)\
**Post date:** [August 7, 2023, 12:31pm UTC](http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616/8 "2023-08-07T12:31:09Z")

</div>

¨Peach. It isn’t easy to make a pop-up screen. I will have ten screen with this pop-up.

Have I to do all in one screen with multiple panel ???

---

<div class="post-metadata">

**Author:** ![Marian\_M](http://forum.squareline.io/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@Marian\_M](http://forum.squareline.io/u/Marian_M)\
**Post date:** [August 7, 2023, 2:48pm UTC](http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616/9 "2023-08-07T14:48:55Z")

</div>

Simply create dummy screen and on it one modal panel . In code then call set parent and move this panel over actual screen and back to dummy on hide.

---

<div class="post-metadata">

**Author:** ![Julien\_Nicola](http://forum.squareline.io/letter_avatar_proxy/v4/letter/j/f475e1/32.png) [@Julien\_Nicola](http://forum.squareline.io/u/Julien_Nicola)\
**Post date:** [August 7, 2023, 3:19pm UTC](http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616/10 "2023-08-07T15:19:55Z")

</div>

Simply. But not so easy when I have to manage the touch action of each panel in each screen.

I do not understand why lvgl redraw the background when the background alpha is set to 0. ???

---

<div class="post-metadata">

**Author:** ![Marian\_M](http://forum.squareline.io/letter_avatar_proxy/v4/letter/m/4af34b/32.png) [@Marian\_M](http://forum.squareline.io/u/Marian_M)\
**Post date:** [August 7, 2023, 3:46pm UTC](http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616/11 "2023-08-07T15:46:59Z")

</div>

I mean panel is only one and event is handled on panel objects…

---

<div class="post-metadata">

**Author:** ![Julien\_Nicola](http://forum.squareline.io/letter_avatar_proxy/v4/letter/j/f475e1/32.png) [@Julien\_Nicola](http://forum.squareline.io/u/Julien_Nicola)\
**Post date:** [August 7, 2023, 3:51pm UTC](http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616/12 "2023-08-07T15:51:04Z")

</div>

If it is possible to add code for component and it is automatically reproduce for each child, it will be nice.

But i don’t know how to add code to component and not to child. Sorry. I’m neebie.

---

<div class="post-metadata">

**Author:** ![Julien\_Nicola](http://forum.squareline.io/letter_avatar_proxy/v4/letter/j/f475e1/32.png) [@Julien\_Nicola](http://forum.squareline.io/u/Julien_Nicola)\
**Post date:** [August 8, 2023, 11:09am UTC](http://forum.squareline.io/t/screen-with-reduced-alpha-appears-white-instead-transparent/1616/13 "2023-08-08T11:09:51Z")

</div>

works perfectly

C.lv\_obj\_set\_parent(C.ui\_UserInfoModal, C.ui\_HomeScreen)

Thanks for the trick.
