set color canvas context code example
Example 1: javascript context color
context.fillStyle = "Green";
context.fillStyle = "#FF0000";
Example 2: canvas set background color
var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
ctx.fillStyle = "blue";
ctx.fillRect(0, 0, canvas.width, canvas.height);