If the Sun's temperature is around 5000K to 6000K which means it is a yellow star, why does it appear white in space? If the thermal radiation of stars is close to the thermal radiation of a black body the sun should appear yellow but yet it appears white because of emitting all of visible wavelengths which combine into white but this is inconsistent with the classification of star colors with respect to their temperatures.
 A: I think that this image is a fairly accurate rendition of blackbody colors, if you view it on a correctly calibrated monitor:

You'll notice that there isn't any yellow in it. So I don't think that there actually are any yellow stars, traditional astronomical diagrams notwithstanding (though of course the spectra of stars are only approximate blackbodies).
Judging by this diagram, the sun as viewed from space should be a bit reddish/orangish. When I convert the AM0 spectrum to sRGB, I get this: $\color{#FFF2ED}{\rule[-0.5ex]{3em}{2.7ex}}$ which is a reddish/pinkish off-white. Perhaps this is the real color of the sun in space—if you viewed it through a neutral density filter so it wasn't too bright, and you used D65 as your reference white.
D65 is supposed to be an approximation of "the average midday light in Western Europe / Northern Europe". It's also the standard white of sRGB, so in some sense it's white by definition. Sunlight at ground level can be much redder or bluer than that depending on time and location. Our eyes/brains adapt to these differences and see a wide variety of spectra as white, so in some sense they're all "white by definition" in the appropriate context.
Rayleigh scattering makes direct light from the sun redder just as it makes indirect light bluer. Both the direct and indirect light illuminate objects, so the sun should always appear redder, or yellower, than the current white point, but I don't look directly at the sun often so I'm not sure.
A: I will tack on some background to benrg's excellent answer. The sun being in the classification known as "yellow dwarf" is an (almost intentional) misnomer. When the stellar classifications were being named, it was already well known that the sun and stars of similar temperature were white, but a name was needed to distinguish main-sequence stars between red dwarfs and blue giants, that at the same time distinguished them from red and yellow giants off the main-sequence. You couldn't call them white dwarfs because that's already taken for the off main-sequence stellar remnant, and those stars look yellow in atmosphere anyway so... yellow dwarf it is.
A: The appearance of things to the human eye is almost always "wrong" in a physical sense.  The human brain does a mighty amount of signal processing, and one of the things it does is "white balance" the scene.  Our sense of color is constantly being adjusted by our brains.  "Broad daylight" happens to be a situation our brains have evolved to work with, so our color balancing in that situation is excellent... if not confusing at times like these.
A: Never look directly into the sun but if you would it should appear white because of its high intensity. Also, sunlight may peak at yellow but contains a lot of red, green, and blue as well.
