Stars come in a wide variety of colors, but never green.
Stars form in a wide variety of sizes, colors and masses, including many bright, blue ones that are tens or even hundreds of times as massive as the Sun. This is demonstrated here in the open star cluster NGC 3766, in the constellation of Centaurus. Stars range from red to orange to yellow to white to blue, but not green. (ESO)
Stars can be red, orange, yellow, white, or blue: a spectacular but incomplete color palette.
The open star cluster NGC 290, imaged by Hubble. These stars, imaged here, can only have the properties, elements, and planets (and potentially chances-for-life) that they do because of all the stars that died before their creation. This is a relatively young open cluster, as evidenced by the high-mass, bright blue stars that dominate its appearance. Again, despite the variety, there are no green stars. (ESA & NASA, ACKNOWLEDGEMENT: DAVIDE DE MARTIN (ESA/HUBBLE) AND EDWARD W. OLSZEWSKI (UNIVERSITY OF ARIZONA, USA))
Stars shine simply because they’re matter, heated up to a specific temperature.
This color diagram shows what’s known as chromaticity space, with the curved edges of the diagram showcasing how light of specific wavelengths (in nanometers) appears to human eyes, while the black curve in the middle corresponds to the colors produced at various temperatures (in Kelvin). Note that the black curve corresponds to allowable star colors. (PUBLIC DOMAIN / PAR OF WIKIMEDIA COMMONS)
They emit a broad spectrum of light, with light’s spectral peak determining what we see.
If you heat up matter that isn’t intrinsically luminous to a specific temperature, it will emit a broad spectrum of light known as blackbody radiation. The hotter the temperature, the bluer the peak of the light gets. However, if the peak occurs at the location of the color green, human eyes will perceive it a white. (E. SIEGEL / BEYOND THE GALAXY)
But where “green” peaks, we observe all the colors; hence they appear white.
The (modern) Morgan–Keenan spectral classification system, with the temperature range of each star class shown above it, in kelvin. Our Sun is a G-class star, producing light with an effective temperature of around 5800 K and a brightness of 1 solar luminosity. Stars can be as low in mass as 8% the mass of our Sun, where they’ll burn with ~0.01% our Sun’s brightness and live for more than 1000 times as long, but they can also rise to hundreds of times our Sun’s mass, with millions of times our Sun’s luminosity and lifetimes of just a few million years. The first generation of stars should consist of O-type and B-type stars almost exclusively, and may contain stars up to 1,000+ times the mass of our Sun. (WIKIMEDIA COMMONS USER LUCASVB, ADDITIONS BY E. SIEGEL)
Similarly, the hottest stars only appear bluish, as even intense violet light is joined by many other colors.
A compilation of eight different Voorwerpjes, as imaged by a team using the Hubble Space Telescope, which were follow-up observations made of these unusual objects as they were discovered by citizen scientists sorting through data from the Sloan Digital Sky Survey. (NASA, ESA, AND W. KEEL ET AL., ARXIV:1408.5159)
But all throughout the cosmos, we frequently observe green light.
As shown here, the International Space Station flies over a spectacular aurora on display in Earth’s atmosphere. Although the aurora may be a beautiful sight, it is no longer mysterious, as science has unlocked the physics that creates this phenomenon, as well as the technological advances capable of having humans observe it from above. (NASA / INTERNATIONAL SPACE STATION)
The commonly green aurorae on Earth are an accessible example.
C/2014 Q2 (Lovejoy) is a long-period comet discovered on 17 August 2014 by Terry Lovejoy. This photograph was taken from Tucson, Arizona, using a Sky-Watcher 100mm APO telescope and SBIG STL-11000M camera. As spectacular as this photograph is, this comet was not visible to the naked eye, but the green color requires no special filter to observe. (JOHN VERMETTE / WIKIMEDIA COMMONS)
Comet comas frequently appear green, too.
This image from ESO’s Very Large Telescope shows the glowing green planetary nebula IC 1295 surrounding a dim and dying star located about 3300 light-years away. The green color arises from emission line transitions in the ionized gas surrounding the dim, dying star. (ESO / FORS INSTRUMENT)
Some dying stars — planetary nebulae — appear green as well.
Modern ‘green pea’ galaxies have their doubly-ionized oxygen emission offset from the main galaxy; in the Subaru Deep Field, the galaxies themselves have been seen exhibiting the strong emission. Green might not be the color of stars, but it is a color clearly present in and around many galaxies. (NASA, ESA, AND Z. LEVAY (STSCI), WITH SCIENCE BY NASA, ESA, AND W. KEEL (UNIVERSITY OF ALABAMA, TUSCALOOSA))
There are even “green pea” galaxies out there.
Hanny’s Voorwerp, identified in 2011, was the first of some 20-odd objects now known to be a collection of green, glowing gas (because of ionized oxygen) that extends for tens of thousands of light years found outside of by nearby galaxies. It was initially discovered by citizen scientist Hanny Van Arkel, as part of the Sloan Digital Sky Survey’s “galaxy zoo” program. (NASA, ESA, W. KEEL (UNIVERSITY OF ALABAMA), AND THE GALAXY ZOO TEAM)
These distant, brilliant, enormous gas clouds clearly shine an eerie green.
One of these Voorwerpjes clearly shows that the green illumination is coming from gas well outside the main galaxy, which itself shows evidence of new star formation and activity near its core. There are many regions rich in this green emission that do not have identifiable stars in them. (NASA, ESA, W. KEEL (UNIVERSITY OF ALABAMA), AND THE GALAXY ZOO TEAM)
But they don’t arise the way typical star colors do.
A number of possible atomic transitions in doubly ionized oxygen, as shown here, are peaked at “green” color frequencies: around 500 nanometer wavelengths. There is also a shorter-wavelength (bluer) optical transition at 436 nm, as well as a number of ultraviolet (coded in pink) and infrared (coded in red) transitions as well, though those are both invisible to our eyes. (BERKLAS, CEPHEIDEN / WIKIMEDIA COMMONS)
Instead, superheated gas loses electrons, becoming ionized.
An optical composite/mosaic of the Crab Nebula as taken with the Hubble Space Telescope. The different colors correspond to different elements, and reveal the presence of hydrogen, oxygen, silicon and more, all segregated by mass. The green color is a consequence of hot, doubly ionized oxygen. (NASA, ESA, J. HESTER AND A. LOLL (ARIZONA STATE UNIVERSITY))
When those electrons recombine with those ions, they emit light at specific wavelengths.
Hubble image of a small region of the Crab Nebula, showing Rayleigh–Taylor instabilities in its intricate filamentary structure. The green color, seen in the filament at the lower right, arises from the presence of doubly ionized oxygen, whose transitions include a bright emission line in the green portion of our eyes’ visual spectrum. (NASA AND THE HUBBLE HERITAGE TEAM (STSCI/AURA))
To shine green, oxygen must become doubly ionized: requiring temperatures of 50,000 K or above.
The strong green emission line (highest point) as shown in a sample of over 1,000 galaxies, spectrally stacked from the Subaru Deep Field. The other point “above” the curves (to the left of the green peak) is from hydrogen; the strong green oxygen line indicates incredibly intense radiation and temperatures in excess of 50,000 K. (MALKAN AND COHEN (2017))
With massive starbursts, nearby quasars, and cataclysmic events, “green” isn’t merely possible, but ubiquitous and mandatory.
Astronomers found that Hanny’s Voorwerp is the only visible part of a 300,000-light-year-long gaseous streamer stretching around the galaxy. The greenish Voorwerp is visible because a searchlight beam of light from the galaxy’s core illuminated it. This beam came from a quasar, a bright, energetic object that is powered by a black hole. An encounter with another galaxy may have fed the black hole and pulled the gaseous streamer from IC 2497. (NASA, ESA, AND A. FEILD (STSCI))