void setup() {
  size(600, 200); 
}

void draw() {
  background(mouseX/2, 0, 255);
  textSize(26); 
  text("mouseX = "+ mouseX, width*1/12, height/2);
  text("mouseY = "+ mouseY, width*2/3, height/2);
}

Processing input:


Processing Output: