Added duration to transition and randomColor function.