If sodium chloride is heated in vapours of sodium, the colour changes because of
electron trapped in anionic sites.
Trapped electron in anionic site creates a F-center. The electronst absorbs energy from the visible light falling on the crystals. So the colour changes.