canvas set color code example
Example 1: how to change canvas color in javascript
let canvas = document.getElementById("canvas");
let ctx = canvas.getContext("2d");
ctx.fillStyle = "#ff0000";
ctx.fillRect(20, 20, 150, 100);
Example 2: javascript context color
context.fillStyle = "Green";
context.fillStyle = "#FF0000";