Master programming syntax, solve interactive challenges & run live code in Syntaxis Explore Arena →
menu_book Course Curriculum (Web Colors) expand_more
Basic Color Syntax
HSL & HWB
Modern Color Spaces
Color Mixing & Contrast
Gradients
Variables & Themes
Blending & Filters
SVG & Canvas Colors
Web Colors / SVG & Canvas Colors

Canvas globalAlpha

Learn Canvas globalAlpha in Web Colors with a focused explanation, a topic-specific example, edge guidance, and a mastery check.

12 min read • Advanced
colors-078.js
js
const ctx=canvas.getContext("2d");ctx.globalAlpha=.4;ctx.fillStyle="red";ctx.fillRect(20,20,80,80);
What to watch
Content source & attribution
Original Syntaxis Content · Original Syntaxis Content