Death of the Sun. Artwork of the Sun forming a planetary nebula at the end of its lifetime. A planetary nebula is an expanding shell of gas (blue and pink) ejected from the outer layers of the Sun after it has used up all of its nuclear fuel. The Sun has stripped the atmosphere from the Earth (bottom), leaving it cold and barren. The Sun will become a planetary nebula in over five billion years time, after first expanding to become a red giant. The Moon (centre left) is also seen.