A nebula does not need dense gas to shine. It needs space. Across enormous distances, sparse atoms can contribute enough light to form a luminous cloud, even when the gas is thinner than many laboratory vacuums. The violet and blue in a stylized image, however, are not necessarily colors an eye would see.
The power comes from stars, not from the thin gas alone. In an emission nebula, ultraviolet radiation from hot stars can strip electrons from atoms through ionization; when electrons recombine with ions, or when collisions excite atoms, the gas can emit light at characteristic wavelengths. Hydrogen often contributes red emission, while oxygen can produce blue green light. Other clouds shine mainly by scattering starlight off dust. The distinction matters: a glowing cloud is not a fire, and its brightness does not imply that its gas is densely packed.
The camera also changes the story. A long exposure collects photons over time, revealing faint structures that the eye, with its much shorter effective exposure, would struggle to detect. Image processing may assign colors to selected wavelengths or intensify them, so a violet cloud can be a scientific or artistic rendering rather than a literal view. Brightness has limits: some nebulae remain too faint for unaided sight, and the density of their gas varies. What looks like a solid sweep of color is instead light gathered from a depth almost impossible to picture.