get class color js code example
Example 1: 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";
}
}
Example 2: get color from classname
var color = $(this).css("background-color");