the major source of light in the expanding shell of gas in a planetary nebula is
Planetary nebula A mechanism for formation of most planetary nebulae is thought to be the following: at the end of the star's life, during the red-giant phase, the outer layers of the star are expelled by strong stellar winds. After most of the red giant's atmosphere is dissipated, the ultraviolet radiation of the hot luminous core, called a planetary nebula nucleus (PNN), ionizes the outer layers earlier ejected from the star.[2] Absorbed ultraviolet light energises the shell of nebulous gas around the central star, causing it to appear as a brightly coloured planetary nebula.
Orion Nebula The Orion Nebula (also known as Messier 42, M42, or NGC 1976) is a diffuse nebula situated in the Milky Way, being south of Orion's Belt in the constellation of Orion.[b] It is one of the brightest nebulae, and is visible to the naked eye in the night sky. M42 is located at a distance of 1,344 ± 20 light years[3][6] and is the closest region of massive star formation to Earth. The M42 nebula is estimated to be 24 light years across. It has a mass of about 2,000 times that of the Sun. Older texts frequently refer to the Orion Nebula as the Great Nebula in Orion or the Great Orion Nebula.[7]