Throughout history, humanity has looked to the stars with admiration. At a first glance, most of them appear white. Some centuries ago, most scientists thought that all stars were white. However, with advances in technology, and thanks to ever more powerful, we have been able to appreciate that stars shine in a great variety of colours.
The temperature of the star
The colour of a star depends, mostly, on its temperature. The more light a star emits, the higher is its temperature. To understand how the light that a star emits affects its colour, we need to know, in the first place, the characteristics of light.
Light travels through space in the form of waves. Like any type of wave, it has peaks, where the energy is maximal, and troughs, where the energy is minimal. The distance between two consecutive peaks (or troughs) is what we name the wavelength. The longest the wavelength, the less energy that type of light will have. In the case of visible light, the less energetic light is the one that has red colour.
On the other hand, light with a shorter wavelength, and hence more energy, corresponds to blue, tending to purple, colour, in the spectrum of visible light.
Naturally, the smallest stars, and therefore the less brilliant of the universe, emit light of low energy. It is for this reason that red dwarfs, which are the smallest stars in the universe, are red (as their name indicates).
However, the biggest and most luminous stars in the universe emit a lot of light of high energy. This type of light, associated with the blue colour, is the one that gives that characteristic blue colour to the most brilliant and hot stars in the universe.
It is important to mention that stars emit light in all wavelengths. However, every star emits a main type of light, which is the one that gives the colour to the star. When the star emits light in many wavelengths in similar quantities, we see it white.
Temperature is not the only factor that determines the colour of a star. A star is composed of a great variety of elements, and the latter also dictates the colour of a star. Stars are mainly formed by hydrogen and helium, and other elements in small quantities.
The percentage of these elements varies from star to star. This change in the composition of stars can change their temperature, and, therefore, the type of light it emits.
So the colour of a star can indicate to scientists its temperature, but also the abundance of certain elements that are present in the latter.