In order to see colors, the gas must be emitting radiation at the frequencies that correspond to the colors. For the gas to emit radiation, its atoms must be in excited states. They must have energies higher than their normal ground states. A discharge of energetic electrons through the gas causes collisions of electrons with the gas atoms, resulting in electrons in the gas atoms being excited to higher energy states. The electrons then return to their normal (ground state) energies by emitting electromagnetic radiation. That is why you see colors. The colors just correspond to different frequencies of emitted radiation as the atoms return to their ground state. The electrical discharge through the tube produces the energetic electrons that collide with the atoms and cause excitation.