So the atmosphere scatters light on its way to earth, making the color of our sky. For example, when the sky is blue on a clear, sunny day, the sunlight appears somewhat yellow because the blue light has been scattered away. However, there is something about this that I do not understand. If certain colors are scattered away, why is there 99.5% of the time some white when you look at the sun (e.g. in pictures)? Even at red sunsets with reddish skies, the sun seems to be somewhat white - how can this happen if almost all the original colors/photons have been scattered away and thus the rest should not be able to constitute a whitish color?
This is because the light detecting device - which might be your retina or might be a piece of photographic film - is getting "bleached out". So, too little light on a typical detector registers as black and too much light registers as white. You can think of the responsiveness of photographs and your eyes as being a hyperbolic tan(), or tanh(), function of the input. When there is too much light photographers call this "overexposed".
So, even though very little blue is making it through to the detector, the sun is so bright that even that little amount of blue is able to overflow the "blue detectors". Far, far more red and green photons are arriving at the detectors, but "maxed out" is "maxed out" and you just get pure white. Tanh(100) approx equals Tanh(10,000). So the detector loses the ability to realize there is more red light than blue light. And, then, approx equal detection of all colors means ... white.
So, imagine that the detector maxes out at 100 photons per second and there are just three colors, red green and blue. At lower light levels sunlight appears red, because there are 30 red photons, 5 green photons and 1 blue photon per microsecond. Clearly red dominates. But at 100x the brightness, looking directly at the sun, there are 3000 red photons, 500 green photons and 100 blue photons. But since the detectors all max out at 100 photons, all three detectors just say "maxed out" - and the result is white.
If one looked at the setting sun through a neutral filter that blocked out most of the photons it would again seem to be reddish. But looking directly at it and bringing the full power of the imaging device (the lenses of your eyes, for example) to bear is what gathers too many photons. At an oblique angle, or through a dim reflection, one might also see fewer photons and perceive the redness. Filters, reflections and observations at oblique angles all cut down on the number of photons that make it through.
To see the color of sunlight with your naked eye without having to correct for the sun's overwhelming brightness, you need to build a pinhole camera. Building a pinhole camera that allows you to see an entire landscape requires a substantial portion of skill or luck. But building a pinhole camera where you can see an image of the sun is so easy that it happens all the time by accident:
That white spot is an image of the sun. It is white because the Sun is white. With less stray light around it you could also see the blue sky, white clouds, and green trees that are near the sun from your perspective. With more distance from the pinhole you can make out sunspots on the image. During a partial eclipse the image is a crescent:
Now you have a simple experiment that you can do as early as dusk tonight to determine the unbiased color of the setting sun: go watch the sunset, and use your hand to make a pinhole sun that projects onto your white shirt. I bet it's still pretty white, because the Sun is white.