Everyone else is talking about the physics, but I see this as actually as a question of colorimetry, because color is a perceptual phenomenon of the human visual system, it’s not just wavelengths and energy.
The sun is a black body with temperature of ~5800K, which means if you were to be able to look directly at it from outer space, without the atmosphere in the way, and somehow also without blinding yourself, the color would be somewhere in between a 5000K and 6500K LED. The atmosphere interferes with this throughout the day to give different colors as viewed on earth, ranging from around 6500K to 2700K.
Now, all these colors along the [black body locus](https://en.wikipedia.org/wiki/Planckian_locus#/media/File:PlanckianLocus.png) (6500K, 5000K, 4000K, 3000K, 2700K, 1800K, etc. and everything in between), are considered “white”, even though they’re obviously very different colors and some are redder or bluer, because the spectrum of the light source actually changes our color perception though a system called “chromatic adaptation”. Basically, a white piece of paper always looks like the same color, no matter what time of day it is, because the brain adjusts for the color of the sun.
So from a psychovisual perspective, you could say that the sun is always white, no matter what time of day, even in outer space.
If you don’t want to take chromatic adaptation into account and want to directly compare it to the color of another light source, then you can get a LED that is close to 5800K and it will be a reasonable approximation.
Of course, another complication is that brightness actually also slightly affects color perception. Even worse, at the brightness of the sun, which is quite literally blindingly bright, our color models completely break down. So you could also say that the sun has no color when you’re directly looking at it, because… well you’d be blind.
Latest Answers