# Why is F2 (fluorine) colourful despite being diamagnetic?

According to Molecular Orbital Theory, $\ce{F2}$ must be diamagnetic, then why is it colourful?

Also, $\ce{O2}$ is paramagnetic but it is colourless in gas phase. Why?

The colour of a molecule does not depend on the whether the molecule is diamagnetic or paramagnetic. The reason is that the colour is caused by absorption of a photon in the visible part of the spectrum. The photon has enough energy to excite one of the two (spin paired in a diamagnetic molecule)) electrons in the highest occupied molecular orbital (HOMO) and into a higher energy unoccupied orbital, usually the lowest unoccupied molecular orbital (LUMO). From spin conservation rules the electron should not change spin. A spin change would correspond to a 'forbidden process' which has a very low chance of occurring so leads to exceptionally weak absorption.

The molecule now has one electron in the lower orbital and one in an upper orbital, these form the excited state, and if the spins are paired it is called a singlet state and the spin multiplicity is 1.

(multiplicity is 2*(total spin) + 1: if the spins are paired the total spin quantum numbers are +1/2+(-1/2)=0. If the spins are unpaired the total spin is 1/2+1/2 and the multiplicity is 3, a triplet state).

In oxygen, which has a triplet ground state, on absorbing a photon an electron is still excited into an upper unoccupied orbital, the spin multiplicity of the excited state produced depends on the relative spins of all the unpaired electrons just as in the case of fluorine.

(As it happens fluorine seems to be a complicated example as it has a low dissociation energy so absorption of a photon puts the molecule into a repulsive excited state leading to two F radicals as the molecule dissociates. It also absorbs weakly at longer wavelengths than needed to dissociate and this may be due to a forbidden, spin changing, transition as mentioned above).

Magnetic properties is not directly related to the colour: the important thing is the spectrum. Also, the magnetic properties can change when the molecule is excited.

The electrons get excited by a certain frequency of EM wave (that's when the energy level of the electron comes out.), and when that frequency is of visible ray, it appears as a 'colour'.

PS. In fact, fluorine gas is not that 'colourful'. It is yellow, but it's very, very pale.