Rainbow over a curved path