01 / 05
The same thing gets mixed in
Gathering colours into an array, you can carelessly add the same colour twice. An array is a container that holds things lined up, so the same value goes in twice as it is.
Checking "is it already in there" with an if every time is a bother. Let us have the container do that for us.