Everyone is playing or working nicely. 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. 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. Last week, I instructed the directress not to send my son to the office and not to call us to pick him up early. Not very helpful. . . I picked him up and informed the school that we would not be returning.