All halogens are coloured. The colour of halogens deepens on passing from F2 to Cl2. F2(yellow), Cl2(yellowish green), Br2(red-brown) and I2 (violet). This happens because:
En2-En1 = Δ E(energy absorbed). (n1 is ground state and n2 is excited state). When atomic no. Increases, Δ E decreases, and as Δ E=hc/λ, wavelength (λ) of light increases. Thus, halogens of higher atomic no. absorb light of longer wavelength in visible region resulting in excitation of outer electrons to higher energy levels.