Spectra of stars indicate chemical composition