On heating ZnO, it loses oxygen and electrons, as shown below:
ZnO(s)heat−−→Zn2++1/2O2+2e−
Zn2+ ions and electrons occupy interstitial sites in the lattice. The sites occupied by the electrons are called colour centres or F − centres. These electrons get excited by absorbing energy from visible light. When they return to their ground state, they impart a yellow colour to the crystal.