Why is the sky blue?

Sunlight looks white, but it is really a rainbow of colors.