Favorite Colors

Color Codes

#660af4
#ff668d
#ca1a66
#007687
#65fbd0
#384961
#5450fd
#3f31ff
#fbed4d
#7B61FF
#placeholder
document.querySelectorAll(".colors").forEach(color => color.addEventListener("click", function(e){
    navigator.clipboard.writeText(e.target.innerText).then(function() {
        var colorcode = e.target.innerText;
        e.target.innerText = "Copied";
        setTimeout(function(){
            e.target.innerText = colorcode;
        }, 500)
      console.log('Async: Copying to clipboard was successful!',e.target.innerText);
    }, function(err) {
      console.error('Async: Could not copy text: ', err);
    });
}))