I'm working on a little side project where mulitple colours are generated and displayed using javascript. https://mrkwrght.github.io/totallycolours/
my code is currently this :
var randomColor15 = "000000".replace(/0/g,function(){return (~~
(Math.random()*16)).toString(16);});
$(function() {
$("#colorbox").css({
backgroundColor:'#' + randomColor
});
$("#colorcode").text("#" + randomColor);
This block is repeat 16 times.There Must be a easier way of doing this.
I also plan to replace the refresh button with a load more button. but I am unsure how this would be done