Fact 1: a rainbow is formed by refraction of light by separating light into all different colors. 
Fact 2: Rainbows are an optical phenomena due to the diffraction of light waves.
a rainbow is formed by diffraction into all different colors.