On the Edge

Take one colour at a time and see how many edges are being used up on the edge of the big square.

Once the edges have been used they can be 'hidden' in the middle