For humans, color is perceived when light strikes the visual cortex and is then process by the brain. However, the colors that humans see are based upon many external factors and processes that occur before we even get the chance to process the light as a specific color.
Why is the Sky Blue?
When rays leave the sun, they are white. As these white rays enter the atmosphere, the molecules in the air react with the white spectrum of the rays. As the light moves through the atmosphere, it bumps into gas molecules. These molecules are attracted to the high-frequency blue components of the white spectrum, while allowing the lower-frequency oranges, reds and yellows to pass through. The molecules absorb the blues, then slowly release and radiate them in the atmosphere. This release of blue light is what causes the sky to appear blue.
Why is the Sun Yellow?
After the much of the blue portion of the white light spectrum is absorbed by the molecules in the atmosphere, the rest of the spectrum continues on its journey. Because the blue element has been removed from the spectrum, the remaining components combine to appear yellow or golden to the naked eye.