Возможно, я не правильно использую Math.random (), хотя не могу понять, что я делаю неправильно:
ctx.fillStyle = "rgb(Math.floor(Math.random()*256),Math.floor(Math.random()*256),Math.floor(Math.random()*256))";
ctx.fillRect(0,0,canvas.width,canvas.height);