If you look closely at the spectra (like rainbows) from the stars you can see patterns of thin lines that match elements like hydrogen and helium that are present in the stars. These lines move with any red shift that takes place allowing us to precisely know the amount of shift, independent of how red or blue the star is.
Latest Answers