Scott Kelly, a former astronaut of NASA claimed that the colour of the sun is white and not yellow.
Kelly confirmed the space fact on Twitter through an account “Latest in Space”.

While it is actually white, the dwarf star appears yellow because of the earth’s atmosphere, Kelly said, adding once a person surpasses the atmospheric layer of our planet, the sun appears white.
According to NASA, Earth’s atmosphere scatters blue light better than red.
“The slight deficit in blue light means the human eye perceives the colour of the Sun as yellow.”
NASA also points out that all x-ray and gamma-ray radiation is filtered out before reaching us on the earth.
As sunlight passes through different layers of the atmosphere, more and more blue light scatters and a greater amount of red light, which has the longest wavelength reaches our eyes. This is also why the sun and even the sky appear redder during sunset.

