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
https://playground.babylonjs.com/#V7X12E

You cannot directly because transparency is inherited BUT you can just add a new rectangle to render the background;)
https://playground.babylonjs.com/#V7X12E#1

Other option: use rgba to render the background of the main rect: https://playground.babylonjs.com/#V7X12E#2

1 Like