Most people are taught from a young age to paint the sun yellow. But what colour is it? Photograph: Ian Waldie/Getty Images

You should never look directly at the sun, as it will damage your eyes very quickly. But if you could look, what colour would you see? The answer turns out to be surprisingly complicated.

To astronomers, the sun is classified as a G2 star, with an apparent colour of yellowish-white, between the white F type and yellow-orange K type. This matches most people's expectations and even from a very young age children are taught to paint the sun as yellow. However, the sun is actually so bright that if you look at it (please don't try) all the light-sensing cells in your retina are immediately overloaded. This means there is no impression of colour, and the overall effect is pure whiteness.

Rayleigh scattering (the elastic scattering of light by particles much smaller than the wavelength of the light) in the atmosphere makes the sky blue; that bright blue light from the sky is actually sunlight reaching you by a round about route. Because this blue light is subtracted from direct sunlight, the apparent light from the sun is shifted slightly towards the yellow end of the spectrum. On a cloudy day all our light arrives indirectly, and the effect is more of perfectly white light. This might be said to be the true colour of sunlight.

A purist might argue that we on Earth are not seeing the real colour of the sun at all, because some of its light is absorbed by the atmosphere. According to one study, if you viewed the sun from space it would be a "peach pinkish" hue.