The sun is actually white. It only appears yellow because the Earth’s atmosphere scatters away light in the blue, indigo and violet wavelength region, while higher wavelength colors, like red, orange and yellow are less easily scattered.