The light from the Sun looks white. But it is really made up of all the colors of the rainbow.
A prism is a specially shaped crystal. When white light shines through a prism, the light is separated into all its colors
Sunlight reaches Earth's atmosphere and is scattered in all directions by all the gases and particles in the air. Blue light is scattered in all directions by the tiny molecules of air in Earth's atmosphere. Blue is scattered more than other colors because it travels as shorter, smaller waves. This is why we see a blue sky most of the time.
The color of an object changes depending on the colors contained in the light source; for example, red paint, viewed under blue light, looks black. Isaac Newton demonstrated with a prism that the white light of the sun contains all colors of the visible spectrum, so all colors are possible in sunlight.