Whenever the Sun is depicted, it's usually done in yellow. That's because whenever we catch a glimpse of it from Earth, it appears as what we interpret to be yellow.
In actual fact, the real color of the Sun is white. It appears yellow because of the effect that atmospheric rendering has.
Light photons reach the atmosphere of Earth from across the visible spectrum, but the more energetic and shorter wavelength photons, like blue and violet colors, are dispersed by particles in the atmosphere. This is why the sky is blue.
Yellow, orange, and red particles have longer wavelengths and have better chance of making it through the atmosphere without being dispersed. For the majority of the day, the light from the Sun passes through the atmosphere in such a way that yellow is the most prominent color.
However, at sunset, the Sun's photons of light are passing through greater atmosphere density to reach your eyes, and so only reddish photons make it through.