Taking the child out of the situation to view what is going on is usually enough of a consequence. 5 minutes is too long for a toddler to be punished. Punishment is not the answer. Sometimes a toddler will push to get attention. Unfortunately it's negative attention.
Limits can be another issue.
The child could be asking for the adult to set limits. I'm impressed that he knows so many colors and has such discernment for his age.