Don't know if this is correct but:
We all know that the individual electrons in an atom need
certain levels of energy before increasing its energy level
state.
The amount of energy required is peculiar to each jump in energy
level.
Consequently when photons collide with the electrons (light
shines onto the atom), only photons of certain energy levels will
be absorbed by the electrons. The others will merely collide and
bounce away.
So the colour you'll see is dependant on what photons are not
absorbed by the electrons.
Also related: The photoelectric effect.