With this sort of thing, it is probably best to save your states using an Object-Oriented approach. Using plain-ole Java constructs, you could have something like this:
Code:
Class BuildingSegment
color segment_color;
float px, py; //x and y position
// other relevant fields
public BuildingSegment(){...}
void setColor(color c){segment_color = c;}
void render()
{
fill(this.segment_color);
rect(...); //etc...
}
}
Within the body of your code, you would instantiate three BuildingSegment objects, and call render() for each of them within the draw loop. Every time the timeline is touched, or whatever happens, you can call the function setColor, or whatever you come up with to modify the rendering of the building.
If this approach seems kind of weird with the OO stuff, you can always set three global color variables and create functions that change them accordingly.
Anyway, I hope this helps to at least point you in the right direction. If you posted more of your code, I could be able to get a better handle on what you're trying to do, if you need more help.