Is it possible to create partially transparent elements on the fly in canvas? Currently I’m setting the whole canvas element’s opacity in CSS, but I want to some elements to be more visible then others.
Nothing I’ve found so far indicates that this is possible.
Simply use
rgba(r, g, b, a)(whereais your alpha transparency from 0 (completely transparent) to 1 (completely opaque):Examples: