The sun appears slightly yellow because the atmosphere scatters blue light more than the rest. The result is the sky looks blue, the sun is slightly yellowish, and the cumulative light (both directly from the sun and diffuse light from the sky) is white. Outside the atmosphere, our sun appears proper white.