Is the sun yellow?
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. This is easy to see in pictures taken from space.
Rainbows are light from the Sun, separated into its colors. Each color in the rainbow (red, orange, yellow, green, blue, violet) has a different wavelength. Red is the longest, blue the shortest.
When we see the Sun at sunrise or sunset, when it is low in the sky, it may appear yellow, orange, or red. But that is only because its short-wavelength colors (green, blue, violet) are scattered out by the Earth's atmosphere, much like small waves are dispersed by big rocks along the shore. Hence only the reds, yellows, and oranges get through the thick atmosphere to our eyes.
When the Sun is high in the sky, the shorter waves, primarily the blue, strike air molecues in the upper atmosphere and bounce around and scatter. Hence explaining why the sky looks blue.