Chemistry - Why do transition elements make colored compounds?
Solution 1:
You are absolutely correct, it all about the metal's electrons and also about their d orbitals.
Transition elements are usually characterised by having d orbitals. Now when the metal is not bonded to anything else, these d orbitals are degenerate, meaning that they all have the same energy level.
However when the metal starts bonding with other ligands, this changes. Due to the different symmetries of the d orbitals and the inductive effects of the ligands on the electrons, the d orbitals split apart and become non-degenerate (have different energy levels).
This forms the basis of Crystal Field Theory. How these d orbitals split depend on the geometry of the compound that is formed. For example if an octahedral metal complex is formed, the energy of the d orbitals will look like this:
As you can see, previously the d orbitals were of the same energy, but now 2 of the orbitals are higher in energy. Now what does this have to do with its colour?
Well, electrons are able to absorb certain frequencies of electromagnetic radiation to get promoted to higher energy orbitals. These frequencies have a certain energy which correspond to the energy difference between different orbitals. Now most substances are only able to absorb frequencies of radiation which are outside the visible light spectrum, for example they might be able to absorb radiation which has a frequency of $300$GhZ (that is infrared radiation). This means that it reflects all other types of radiation, including the full spectrum of visible light. So our eyes see a mixture of all the colours; red, green, blue, violet, etc. This is seen as white (this is why several organic compounds are white).
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.
So for example, if the electrons in an octahedral metal complex are able to absorb green light and get promoted from the $d_{yz}$ orbital to the $d_{z^2}$ orbital, the compound will reflect all other colours except for green. Therefore by using the colour wheel, we can find the complementary colour of green which will be the colour of the compound, which is magneta.
This explains why not all transition metal complexes are colourful. For example copper sulfate is a bright blue compound, however zinc sulfate on the hand is a white compound despite being a transition metal. The reason behind this is because zinc's d orbitals are completely filled up with electrons, meaning that it is not possible for any electron to make a d-> d transition as they are all filled up. Hence you might sometimes see zinc referred as not being a transition metal.
Solution 2:
The partially full d-orbitals in transition metals have energy splittings that happen to lie in the visible range. Depending on the arrangement of substituents (known as ligands) that attach to them, the electron energies split according to crystal field theory. Similar splitting in the s or p orbitals produce gaps in the ultraviolet, and any visible light goes right through, so we don't see any color. In transition metals, however, visible light excites the electrons from a lower d orbital to a higher one and only letting some light through.