Yellow colour in NaCl is due to metal excess defect due to which unpaired electrons occupy anionic sites. known as F-centres. These electrons absorb energy from the visible region for the excitation which makes crystal appear yellow.