Instancing cubes and coloring them in Unity (c#)

Please add code tags to your post in order to improve readability.