I know that flame tests can be used to distinguish between some metal ions, and that the colours come from excited electrons returning to the ground state. My question is, why don't non-metal anions also produce colours? Are their emission spectra in the non-visible range? Is there a simple reason why?