set color from class js code example
Example: javascript change color for class name
function reset() {
var elements = document.getElementsByClassName('pixel'); // get all elements
for(var i = 0; i < elements.length; i++){
elements[i].style.backgroundColor = "white";
}
}