Gravity of a rainbow