Study of the precipitation behavior of NaCl:Pb and KCl:Pb by optical spectroscopy†