In the visible portion of the electromagnetic spectrum, blue light has the highest frequency and red light has the lowest. The term blueshift is used when visible light is shifted toward higher frequencies or toward the blue end of the spectrum, and the term redshift is used when light is shifted toward lower frequencies or toward the red end of the spectrum. Today, we can observe light in many other parts of the electromagnetic spectrum such as radio, infrared, ultraviolet, X-rays and gamma rays. However, the terms redshift and blueshift are still used to describe a Doppler shift in any part of the spectrum. For example, if radio waves are shifted into the ultraviolet part of the spectrum, we still say that the light is redshifted - shifted toward lower frequencies.
The light from most objects in the Universe is redshifted as seen from the Earth. Only a few objects, mainly local objects like planets and some nearby stars, are blueshifted. This is because our Universe is expanding. The redshift of an object can be measured by examining the absorption or emission lines in its spectrum. These sets of lines are unique for each atomic element and always have the same spacing. When an object in space moves toward or away from us, the absorption or emission lines will be found at different wavelengths than where they would be if the object was not moving (relative to us).
The change in wavelength of these lines is used to calculate the objects redshift. Redshift is defined as the change in the wavelength of the light divided by the wavelength that the light would have if its source was not moving (called the rest wavelength).