Look up into the sky at night, and you will see lots of stars1. Look closely and you can see that the stars are different colours. All the colours are washed out and hard to see; this is a consequence of the stars being very faint, and the colour sensors in our eyes not working well at low light levels. But the colours are there: red, orange, yellow, white and blue. There are reddish ones like Betelgeuse, yellowish ones like Capella, and blue ones like Vega. Some like Polaris are just plain white.
Now look at a rainbow. You'll see a smear of colours with red at one end and violet at the other, with orange, yellow, green and blue in between2. The rainbow has two noticeable colours that you won't find in the stars: green and violet. So why are there no green or violet stars?
A Visit to the Blacksmith
Let's take a trip back in time, to when there were horses in our everyday lives. One very important man was the blacksmith - his job was making the metal 'shoes' that were used to protect the hooves of horses. The blacksmith heated up iron in a fire, then hammered it out on an anvil until it was in the shape of a horseshoe. You may occasionally meet a blacksmith even today - as well as making shoes, they also are skilled in decorative ironwork. The iron starts out dull grey when it is put into the fire. As it heats up, it glows red, then becomes hotter and glows orange. Hotter still, the iron will glow yellow and finally it will become white hot. This sequence of red, orange, yellow, white matches the colours of the stars.
Although iron will not survive if you heat it up more than white-hot, there are certain things which can survive being heated even hotter, and we find that they do in fact glow with a bluish-white colour. The electric arc of an arc-welder or a flash of lightning are both examples of something so hot that it glows with a blue-white colour.
So there's good evidence that the stars are different colours because they are heated to different temperatures. Current theory says that a nuclear reaction in the centre of a star heats the outer parts, and these then glow with a colour which depends on their temperature. The hottest stars are bluish-white and the coolest are red. This may seem the wrong way around, as we are used to thinking of blue as a cool colour. The sky and the sea are blue, after all. But they don't glow due to their own internal heat - things that glow blue are very hot indeed.
Since violet would be even hotter than blue, we might conclude that there are no violet stars because none of them are hot enough. But this still leaves the question of green. We can now reword our main question as 'Why do objects not glow green when they are really hot?'
Black and White
Before answering this question, we need to look at two more 'colours' - black and white. While artists may think of black as a colour, physicists say that it is an absence of colour. White light, on the other hand, is a mixture of lots of colours. Shine a blue light and a yellow light, and they will mix together to make white. Similarly a green light and a magenta light will look white when mixed together.
Most objects don't give off light of their own. In a dark room, you won't be able to see them. Instead, their colour represents the way in which they reflect or absorb the light that falls on them. A white object reflects any light that falls on it. A red object absorbs any light that is not red, so only the red light is reflected. All the rest is absorbed by the object, and it heats up slightly as a result. Black objects reflect very little light - a perfect black would absorb all the light that falls on it and reflect none, heating the object up slightly. If you keep shining light on the perfectly black object, it will continue to absorb the light and will continue to heat up. This leads us to the conclusion that black objects must actually emit energy to balance the light they are absorbing. If they didn't, they'd keep heating up until they melted.
It turns out that black objects at room temperature do in fact glow very slightly, but the light they give off is not visible to us - not only is it very faint, but it is also infra-red. That is, its frequency is so low that it lies outside the range of colours our eyes are capable of detecting.
This light given off by black objects is known as 'Black Body Radiation'.
Black Body Radiation
If we heat the object by other means, such as putting it in a furnace, the intensity of the black body radiation increases, but it also shifts into the visible spectrum. It isn't just one colour, though. It is spread across a range of colours. At low intensities, it is entirely in the infra-red region. At slightly higher intensity, it is a mixture of infra-red and red, but we see this as red. This is the red-hot glow of a red star or the blacksmith's horseshoe.
Turn up the temperature a bit more, and orange light will be added to the black body radiation.
As the temperature increases further, the light given off as black body radiation includes the colours yellow, green, blue and eventually violet, but in all cases the 'cooler' colours are also present in the radiation. A mixture of red, orange and yellow looks whitish-yellow. A mixture of red, orange, yellow and green looks white rather than green. A mixture of red, orange, yellow, green and blue will look slightly bluish-white. Add violet to the mix and the overall colour will look less red, but it will still appear to be bluish-white. Hotter still, some of the light will be ultraviolet, but our eyes can't see this, so it will continue to look bluish-white.
So because the stars give off light over a range of different colours, we'll always see a mixture, and none of these mixtures is either green or violet. There are no green or violet stars.
Green by Optical Illusion
Many of the stars visible in the sky look like single dots, but examine them through a telescope and you will find that they are double. More than half the visible3 stars are in fact two or more stars orbiting closely around each other. These can be quite spectacular to look at in a large telescope, particularly when the two stars are of different colours.
For example, Albireo, also known as beta Cygni, is one of the bright stars in the constellation of Cygnus 'the swan'. Albireo marks the position of the head of the swan. Through a telescope it turns out to be a bright amber-coloured star, Albireo A, accompanied by a dimmer blue-green star, Albireo B. Note that description: blue-green. In fact, measurements using instruments show that Albireo B is bluish-white. The green tint is an optical illusion and comes from the contrast with the amber of Albireo A.
Having said all this, there is in fact one star that is often described as green in colour. This is the star Zubeneschamali, also known as beta Librae. As well as being one of the two bright stars in the constellation of Libra, the balance, it is also one of the claws of Scorpius, the scorpion. In fact the name Zubeneschamali is Arabic and means 'northern claw'.
Zubeneschamali is a spring/summer star. Here's how to find it. First of all, find the Plough (also known as the Big Dipper). Below the Plough, you should be able to see the constellation of Leo, which looks like a seated lion with his paws stretched out in front of him to the right. Now, leaving Leo, go back to the Plough. Follow the curve of the handle around and down, until you meet Arcturus, the fourth brightest star in the sky. It is a red star, although you might consider it more pink than red. Continue down through Arcturus about the same distance and you reach Spica (alpha Virginis) - not as bright as Arcturus, but the brightest star in its area of the sky. Imagine a line joining Arcturus to Spica. Now imagine an equilateral (equal-sided) triangle with this line as one of the sides, and the triangle extending away from Leo. The third corner of the triangle is pretty close to Zubeneschamali.
So is this star really green? Spectroscopic measurements of it show it to be an X-class star, which should mean it is pale blue or bluish-white. Observations by the author of this Entry through a telescope (which intensifies the colour of the star) show that it is as expected: pale blue. The green star appears to be a myth.