It was noticed that not all stars of the same color can be classified in the same categories. The determination that truly seperates the regular old stars from the giants is their mass. The Morgan-Keenan system classifies stars by their luminosity classes. For example, our Sun is a G2 V star, while a red supergiant like Betelgeuse is a M2 Ia star. Remember that longer wavelengths mean lower frequencies, and therefore lower energies.
Lower energy means lower temperature.
Check out this cool java aplet to better understand how this displacement takes place. Look at the spectra of real stars Back to Stars Page Created by Marta Lewandowska , July 1999. CWRU Astronomy Dept.