The Solar Center at Stanford says:
"It is a common misconception that the Sun is yellow, or orange or even red. However, the Sun is essentially all colors mixed together, which appear to our eyes as white. When we see the Sun at sunrise or sunset, it may appear yellow, orange, or red. But that is only because its short light rays (blue, purple) are scattered out by the Earth's atmosphere, much like small waves are dispersed by big rocks along the shore."