# Why are HgO and CdS compounds colourful?

We know that the electron configuration in $3d$ orbitals of $\ce{Zn^2+}$, in $4d$ orbitals of $\ce{Cd^2+}$ and in $5d$ orbitals of $\ce{Hg^2+}$ ions are completely same.

Then why the compounds of $\ce{Hg(II)}$ and $\ce{Cd}$, such as $\ce{HgO}$, $\ce{CdS}$ radiate versatile colour where $\ce{ZnO}$, $\ce{ZnS}$ are white?

• – Mithoron May 26 '15 at 13:59
• $\ce{HgCl2}$ and $\ce{CdCl2}$ are colourless; just for reference. – Jan May 26 '15 at 14:34
• That question doesn't relate to mine @Mithoron – rafi ur rashid May 26 '15 at 14:49
• We see a similar situation with oxides of alkali metals: chemistry.stackexchange.com/questions/72243/… – Oscar Lanzi Feb 28 at 2:46