Doppler Effect and Red Shift
The fact that a star, or any light source, is moving toward or away from you does not affect what it emits - it affects what you (as the observer) perceive it emitting.
The apparent shift of wavelength of light toward the red red of the spectrum when the emission source is moving away from us, or toward the blue end when the emitter is moving toward us, is called the Red Shift - for sound it is called the doppler shift.
Light consists of fluctuations in, or waves of the electromagnetic field. The wavelength (or distance from one wave crest to the next wave crest) of light is extremely small for visible light it ranges from four to seven ten millionths of a meter (400nm 700nm),
The different wavelengths of light are what the human eye sees as different colours because they are sensed in different proportions by the cones. The longest wavelengths appear in the red end of the spectrum and the shortest appear in the blue end.
Imagine a source of light at a constant distance from us, emitting waves of light at a constant wavelength. Obviously, the wavelength of the waves we receive will be the same constant wavelength at which they are emitted by the source.
Suppose now that the source starts moving directly toward us. When the source emits the next wave crest, it will be nearer to us, so the distance we will see between the two wave crests arriving will appear to be smaller than when the star was stationary. This means that the wavelength of the waves we receive will be shorter (or shifted toward the blue end of the spectrum) than when the source was not moving.
Similarly, if the source is moving away from us, the wavelength of the waves will appear slightly longer, or shifted toward the red end of the spectrum. The relationship between wavelength and speed is called the Doppler effect.
Doppler Redshift results from the relative motion of the light emitting object and the observer.
If the source of light is moving away from you then the wavelength of the light is stretched out, i.e., the light is shifted towards the red.
If the source of light is moving towards you then the wavelength of the light is compressed, i.e., the light is shifted towards the blue.
These effects, individually called the blueshift, and the redshift are together known as doppler shifts. The shift in the wavelength is given by a simple formula
(λo - λR) / λR = v/c
so long as the velocity v is much less than the speed of light. A relativistic doppler formula is required when velocity is comparable to the speed of light.
Cosmological Redshift is a redshift caused by the expansion of space. The wavelength of light increases as it traverses the expanding universe between its point of emission and its point of detection by the same amount that space has expanded during the crossing time.
Gravitational Redshift is a shift in the frequency of a photon to lower energy as it climbs out of a gravitational field.