xxxxxxxxxx
let palettes = [
{
name: "CUPCAKE",
colors: ['#996DD9','#6DD6D6','#575757','#CBCBCB'],
},
{
name: "PUEBLO",
colors: ['#EAA388','#FF7878','#575757','#CBCBCB'],
},
{
name: "SIXTY FEET UNDER",
colors: ['#444DA0','#449FA0','#7755BB','#CBCBCB'],
},
{
name: "DREARY RACE",
colors: ['#CFAFB1','#AFBFCF','#CFC8AF','#AEAEAE'],
},
{
name: "SPOOKY",
colors: ['#414141','#7755BB','#996DD9','#AA99C9'],
},
{
name: "RACE DAY",
colors: ['#D12D35','#3478BC','#F8D86E','#000000'],
},
{
name: "MAGMA",
colors: ['#D12D35','#CFAFB1','#F8D86E','#CFC8AF'],
}
];
let colors;
let palette;
function setup() {
background('#E3E3E3');
width = 400;
height = 400;
createCanvas(width, height);
let i = int(random(0,palettes.length));
palette = palettes[i].name;
colors = shuffle(palettes[i].colors);
noStroke();
rect(0,0,width,100);
fill(colors[0]);
rect(0,100,100,300);
fill(colors[1]);
rect(100,100,100,300);
fill(colors[2]);
rect(200,100,100,300);
fill(colors[3]);
rect(300,100,100,300);
textSize(25);
fill('#000000')
textAlign('center','center');
text(palette,200,50);
}