let x, y, r, g ,b;

function setup() {
  createCanvas(windowWidth, windowHeight);
  background(0);
}

function draw() {
  //r = random(255);
  //b = random(255);
  //g = 0;
  x = random(windowWidth);
  y = random(windowHeight);
  noStroke();
  fill(r, g, b, 100);
  circle(mouseX, mouseY ,50, 50, 10);  
  
if (mouseX > windowWidth/2) {
  r = random(255);
  g = random(255);
  b = random(255);
}
}

https://editor.p5js.org/idhyj/sketches/jA0K00IiI