The term
yellow dwarf is a misnomer, because G-type stars actually range in color from white, for more luminous types like the Sun, to only very slightly yellowish for less massive and luminous G-type main-sequence stars. The Sun is in fact white, but it can often appear yellow, orange or red through
Earth's atmosphere due to atmospheric
Rayleigh scattering, especially at sunrise and sunset. In addition, although the term "dwarf" is used to contrast G-type main-sequence stars with
giant stars or bigger, stars similar to the Sun still outshine 90% of the stars in the
Milky Way galaxy (which are largely much dimmer
orange dwarfs,
red dwarfs, and
white dwarfs which are much more common, the last of which being
stellar remnants). A G-type main-sequence star with the mass of the Sun will fuse hydrogen for approximately 10 billion years, until the hydrogen is exhausted at the core of the star. When this happens, the core begins to collapse and heat up, inducing intense hydrogen fusion in the surrounding shell. This shell fusion produces more energy, increasing outward pressure that pushes the outer layers outward, causing them to expand, cool, and darken as it passes through the
subgiant branch and ultimately expanding into many times its previous size at the tip of the
red giant phase, about 1 billion years after leaving the main sequence. After this, the star's degenerate helium core abruptly ignites in a
helium flash fusing
helium, and the star passes on to the
horizontal branch. As the core helium supply starts running out, it passes onto the
asymptotic giant branch where it expands even further and pulses violently, with the star's gravity insufficient to hold its outer envelope. This results in significant mass loss and shedding. The ejected material remains as a
planetary nebula, radiating as it absorbs energetic photons from the photosphere. Eventually, the core begins to fade as nuclear reactions cease, and becomes a dense, compact
white dwarf, which cools slowly from its high initial temperature as the nebula fades. ==Subdwarfs==