Node.js examples for CSS:Color
Push a color to the DOM
function setColor(elements, attribute, color) { Array.prototype.forEach.call(document.querySelectorAll(elements), function (element) { element.setAttribute(attribute, "#" + color); });/* w w w . j av a 2 s.c o m*/ }