The Sun’s light is white

Outside Earth’s atmosphere, the Sun would look white, not yellow. It sends out light across the visible spectrum—the range of colors human eyes can see. Mixed together, those colors are perceived as white. The Sun does emit slightly more energy in some visible wavelengths than others, but not enough to make its overall appearance distinctly yellow in space.

Why it often looks yellow from Earth

Sunlight has to pass through the atmosphere before it reaches the ground. Air molecules scatter shorter-wavelength blue light more strongly than longer-wavelength red light, sending some of the blue light away from the direct path between the Sun and your eyes. The light arriving straight from the Sun is therefore shifted toward warmer colors, especially when the Sun is low and its rays travel through more atmosphere. That is why sunrise and sunset can look orange or red.

The apparent color also depends on conditions and perception: haze, clouds, and the brightness of the surrounding sky can all affect what you see. And the Sun is so bright that looking at it directly can injure your eyes; its apparent color is not a reason to test the view without proper protection.