How do rainbows work?
The two main parts of why we see a rainbow are refraction, the fact or phenomenon of light, radio waves, being deflected in passing obliquely through the interface between one medium and another or through a medium of varying density, and reflection,the throwing back by a body or surface of light, heat, or sound without absorbing it. As light crosses boundaries, the rays bend at different angles. The angles all depend on the wavelength of the light, in which also determines the color. Specifically in a rainbow, white sunlight enters a raindrop and is broken into different colors heading in slightly different directions. The light is then reflected off the back of the raindrop and passes back into the air again. This is how we can see a rainbow. So, due to the raindrops, reflection and refraction, rays, angles, light, and out perspective; we can see a rainbow.
Why can we see a colorful sunset?
Why are sunsets so colorful? Well, it has to do with a similar concept as the rainbow. Different waves, wavelengths, reflect off of the water vapor. To the right it shows the different wavelengths and what color they are. Red, having the highest wavelength, and violet, having the smallest wavelength. The sun is the source of these light waves. Actually, things like leaves and grass get there true color from light waves coming from the sun.