随机生成颜色:
context.fillStyle = "#" + (~~(Math.random() * (1 << 24))).toString(16);
context.fillStyle = "#" + (~~(Math.random() * (1 << 24))).toString(16);
2016-11-22