The distance of the rainbow