The sun appears yellow to our eyes, but in reality, it emits light in all colors of the visible spectrum. The color of the sun is determined by its surface temperature. The sun's surface temperature is around 5,500 degrees Celsius (9,932 degrees Fahrenheit), which corresponds to a yellow-white color. However, when sunlight passes through the Earth's atmosphere, it gets scattered by the molecules and particles in the air. This scattering of light causes the blue and violet wavelengths to scatter more than the other colors, making the sky appear blue. As a result, the sunlight that reaches our eyes appears more yellow.