1. The following is my rainbow rect: Code here.
2. The following is my color-motion solution: Code here.