Formation of Colored Ions:
In an isolated atom or ion of a transitional element, all the five d- orbitals are of same energy (they are said to be Degenerate).
When visible light falls on the sample, the electrons from the lower energy level get promoted to a higher energy level due to the absorption of light of a characteristic wavelength (or color). Rest of the light gets transmitted. The transmitted light has a color complementary to the absorbed color. Therefore, the compound or the solution appears to be of the complementary color.
Colour of Metal Ions:
However transition metals are special in that the energy difference between the non-degenerate d orbitals correspond to the energy of radiation of the visible light spectrum. This means that when we look at the metal complex, we don’t see the entire visible light spectrum, but only a part of it.