Today lets learn about globalAlpha and rgba properties of Canvas. Lets draw 2 rectangle and apply rgba and see how…