why different colours are obtained
electrons get excited when heated so more to higher energy levels which involves a particular amount of energy
as elections fall back down to original energy level they release energy in the form of light
difference in energy between higher & lower energy levels determines the wavelength of light released which determines the colour