xxxxxxxxxx
25
function setup() {
createCanvas(500, 500);
background(255);
noStroke();
r = random(50, 200); // r is a random number between 0 - 255
g = random(0,50); // g is a random number betwen 100 - 200
b = random(50, 220) // b is a random number between 0 - 100
a = random(150,255); // a is a random number between 200 - 255
fill(r, g, b, a);
}
function draw() {
background(255, 255, 255, 125)
circle(mouseX, mouseY, 100);
if(mouseIsPressed){
r = random(50, 200); // r is a random number between 0 - 255
g = random(0,50); // g is a random number betwen 100 - 200
b = random(50, 220) // b is a random number between 0 - 100
a = random(150,255); // a is a random number between 200 - 255
fill(r, g, b, a);
}
}