Color centers are generally formed when an anion vacancy in the crystal lattice captures an electron. This can occur naturally during crystal formation or be induced through processes such as irradiation, doping, or mechanical processing. The trapped electron in the vacancy can absorb specific wavelengths of light, resulting in the appearance of color.