There are 7 colors of the rainbow: Red, Orange, Yellow, Green, Blue, Indigo, VioletThese colors always appear in…