the maths of the rainbow