xxxxxxxxxx
int Color = 150;
void setup (){
size(500,500);
background(0);
}
void draw() { //square in middle
fill(Color);
noStroke();
rectMode(CENTER);
rect(250, 250, 100, 100);
if (mouseX > 200 && mouseX < 300 && mouseY > 200 && mouseY < 300)
Color = 255; //If mouse is over box, it turns white
else Color=150; //otherwise, remains gray
}