<body bgcolor="orange"> <canvas width="300" height="300" id="testcase-canvas-dest"></canvas> <script> const kTransparent = "rgba(0%, 100%, 100%, 0.5)"; cx2 = document.getElementById('testcase-canvas-dest').getContext('2d'); cx2.fillStyle = kTransparent; cx2.fillRect(0,0,100,20); </script> </window>