A rainbow appears in the heavens opposite to the sun and it is caused by the refraction and reflection of the sun’s rays in water droplets.
The colors of a rainbow and its secondary bow are opposite each other because of the number of reflection inside droplets.