void setup() { size(600,600); } void draw() { float gray = map(mouseX, 0, width, 255, 0); background(255, gray, gray); }