Transition metal ion compounds/complexes are often colored because of transitions of electrons between d-orbitals of different energy
When an electron from a lower energy d orbital is excited to a higher energy d orbital, the energy of excitation corresponds to the frequency of light absorbed
The color observed corresponds to the complementary color of the light absorbed
Colours of some of the first row transition metal ions in aqueous solutions
From left to right $V^{4+},V^{3+},Mn^{2+},Fe^{3+},Co^{2+},Ni^{2+}$ and $Cu^{2+}$
The rare mineral crocoite, $PbCrO_4$, occurs as spectacular long red crystals
$[Ni(NH_3)_6]^{2+}$
$[Ni(en)_3]^{2+}$
$[Ni(Cl)_4]^{2+}$
$[Ni(H_2O)_6]^{2+}$