createButton = (stack) => {
var button = DOM.element('button');
button.textContent = 'button';
button.style.backgroundColor = '#FF0000';
button.style.color = 'white';
button.addEventListener('click', function(){
var hexColor = "#" +
button
.style
.backgroundColor
.match(/([0-9]+)/ig)
.map((i)=> Number(i).toString(16))
.map(function(hex){ return hex.length > 1 ? hex : "0" + hex})
.join("")
stack.push({button, hexColor});
button.style.backgroundColor = color();
});
return button;
}