Non-stoichiometric defects can arise when a solid is heated.
The crystals with this defect becomes coloured. Alkali halides like NaCl and KCl show this type of defect. When crystals of NaCl are heated in an atmosphere of sodium vapour, the sodium atoms are deposited on the surface of the crystal. The CI– ions diffuse to the surface of the crystal and combine with Na atoms to give NaCl. This happens by loss of electron by sodium atoms to form Na+ ions. The released electrons diffuse into the crystal and occupy an ionic sites. As a result the crystal now has an excess of sodium. They impart yellow colour to the crystals of NaCl.