While it appears yellow to us from Earth, that's due to the way the Earth's atmosphere scatters sunlight. The blue and violet wavelengths are scattered more, making the sky blue, and leaving the longer wavelengths (yellow and red) to reach our eyes directly from the Sun.
In space, where there's no atmosphere to scatter light, the Sun appears white.