How to I out a semi-transparent panel behind a HUD

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Dalo

I have a debug HUD that can be shown over the game showing various stats. It consists of Node2D → CanvasLayer->BoxContainer->Labels. On a bright scene I cannot read the text so would like to put a semi-transparent grey panel behind it. Could anyone tell me how this can be achieved? Many thanks.

:bust_in_silhouette: Reply From: jgodfrey

One simple way is to just put a ColorRect at the “back” of your HUD scene (so, near the top of your HUD scene tree). Then, just assign a color and adjust its alpha value as necessary to get the semi-transparency you want.