<html>
<head>
<style>
body {padding:0px;margin:0px;}
</style>
</head>
<body>
<canvas id="demo"></canvas>
<script>
var c=document.getElementById('demo');
var cc=c.getContext("2d");
//array of gray colors - these are very similar colors, let's hope this works out well.
var items = ["#A9A9A9","#A7A7A7","#A5A5A5","#A3A3A3","#A1A1A1","#BBB"];
window.addEventListener("load",setDimensions);
window.addEventListener("resize",setDimensions);
setInterval(draw,100);
function setDimensions() {
c.width=window.innerWidth;
c.height=window.innerHeight;
};
function draw() {
for (i=0;i<c.width;i+=2) {
cc.fillStyle=items[Math.floor(Math.random()*items.length)]; // random color from array
cc.fillRect(i, 0, 2, c.height);
};
};
</script>
</body>
</html>