In a complex transition metal ion, the electric field produced by the lone pairs on ligands when they interact with the central metal ion causes the d orbitals to split into two sub levels. As the dx2-y2 and dz2 have electron density on the axis, they interact more with the ligand electric field and are split to a higher energy than the other 3 orbitals.
The energy difference between the two sub levels is referred to as delta E.When a photon of light is absorbed by the complex, a photon of light of the complementary colour is transmitted, this is the colour that is observed. The light that is absorbed is used to promote an electron to the higher energy sub level.
The higher the energy of the light absorbed, the shorter the wavelength. Therefore if high energy light is absorbed, long wavelength light is transmitted (colour is towards the red end of the spectrum). If lower energy light is absorbed, short wavelength light is transmitted (colour is towards the blue/violet end of the spectrum).