A rainbow results from sunlight interacting with water droplets through reflection, refraction, and dispersion. These colorful arcs generally appear when sunlight and airborne water droplets coexist, frequently following rain. As sunlight enters a water droplet, it bends (refracts), bounces off the inner surface (reflects), and bends again as it exits, producing a range of colors.Rainbows are observable post-rainfall due to water droplets dispersing sunlight into its component colors.