So ändern Sie die Canvas -Farbe in JavaScript
let ctx = canvas.getContext("2d");
ctx.fillStyle = "#ff0000";
ctx.fillRect(20, 20, 150, 100);
Cruel Crocodile
let ctx = canvas.getContext("2d");
ctx.fillStyle = "#ff0000";
ctx.fillRect(20, 20, 150, 100);