Red giant will begin to expand into a subgiant. Eventually, the pressure builds up so much that the core will begin to fuse helium, and will expand even more into a red giant. At its largest, its surface (photosphere) will approximately reach the current orbit of Earth. It will then lose its atmosphere completely; its outer layers forming a planetary nebula and the core a white dwarf. The evolution of the Sun into and through the red-giant phase has been extensively modelled, but it remains unclear whether Earth will be engulfed by the Sun or will continue in orbit. The uncertainty arises
Blue giant both cooler and more luminous. Intermediate-mass stars will continue to expand and cool until they become red giants. Massive stars also continue to expand as hydrogen shell burning progresses, but they do so at approximately constant luminosity and move horizontally across the HR diagram. In this way they can quickly pass through blue giant, bright blue giant, blue supergiant, and yellow supergiant classes, until they become red supergiants. The luminosity class for such stars is determined from spectral lines that are sensitive to the surface gravity of the star, with more expanded and luminous stars being given I (supergiant) classifications