It is because of the Metal excess defect due to anionic vacancies.
When crystals of KCl are heated in an atmosphere of potassium vapour, the potassium atoms are deposited on the surface of the crystal. The Cl– ions diffuse to the surface of the crystal and combine with K atoms to give KCl. This happens by loss of electron by sodium atoms to form K+ ions. The released electrons diffuse into the crystal and occupy anionic sites. As a result the crystal now has an excess of potassium. The anionic sites occupied by unpaired electrons are called F-centres (for colour centre). They impart violet colour to the crystals of KCl. The colour results by excitation of these electrons when they absorb energy from the visible light falling on the crystals.