However, atoms can emit (make) or absorb (destroy) light of very specific colours. When the atoms in a gas are hotter than the source of the incoming light, they make the light, and when colder, they absorb it.
Different atoms make or absorb different sets of colours. This means that astronomers can tell what atoms a star is made of by looking at the different colours that have been made or absorbed by the different atoms.
Click below to view ...> > Plain Starlight
The light from the visible surface of a star produces a smooth spectrum of colours.
Passing through a Hot gas
The atoms in a hot gas emit narrow lines of light at different colours. These are added to the light from the star's surface. You can find hot gases in the outer layers of a star's atmosphere.
Passing through a Cold Gas
The atoms in a cold gas will absorb some colours of light from the star. The gas just needs to be cooler than the star's surface, and you can find cooler regions like this in a star's inner atmosphere.