BABYLON.GUI.TextBlock set alpha separately

Hello, I made GUI label with BABYLON.GUI.Rectangle and TextBlock.
I want set alpha value 0.6 to rectangle and 1 to text block separately.
but it seems alpha linked with rectangle and text block (follow rectangle’s alpha)

is it possible?
PG is here

You cannot directly because transparency is inherited BUT you can just add a new rectangle to render the background;)

Other option: use rgba to render the background of the main rect:

1 Like