change the color of an element canvas code example
Example 1: 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);
Example 2: canvas font colour
context.fillStyle = 'white';