
Make a rectangle using the Rectangle tool. Use Alt+drag and Shift key one time down to the right position. Click Control+D three times. To change the colour, select the rectangles one by one and by clicking on a swatch.

Choose all the rectangles and group them.

Navigate to Effect>Warp>Arc.

Change the Horizontal percentage to 80%.

Click on Expand Appearance.

Now we have a rainbow.

|
|
|
|
|