@Seamus: Wow, my first chat post. Concerning your color question above: You once asked a question on tex.sx, I answered it (and you said you didn't fully understand my answer), but there was indeed an `\edef` involved:
http://tex.stackexchange.com/questions/7170/change-colour-depending-on-counter/7171#7171