At the end of its life, the Sun will bloat into a red giant, and its outer layers will drift away to create a glowing planetary nebula like these examples.  This gallery of planetary nebula is a set of composite images by two NASA space telescopes.

The image from the Chandra X-ray Observatory is shown in purple, and traces shock waves within the nebula.  The red, green, and blue detailed images are from the Hubble Space Telescope.

Credit: X-ray: NASA/CXC/RIT/J.Kastner et al.; Optical: NASA/STScI