Preheat oven to 325 degrees F. Spray baking pans with cooking spray and set aside.
Prepare cake mix according to package instructions.
Divide cake mix evenly between 5 small bowls or large ramekins. Dye each bowl of batter as follows: Red: 12 drops red food gel, Orange: 5 drops orange food gel, 5 drops yellow food gel, 1 drop red food gel, Yellow: 5 drops yellow, 1 drop orange, Green: 5 drops yellow, 1 drop blue, Blue: 10 drops blue
Pour each bowl of cake batter into a separate cake pan. Place cakes in oven on center rack. Bake 15 minutes, rotating pans halfway through cooking time.
Remove pans from oven and allow cakes to cool completely.
Using a 3-inch biscuit cutter, cut a circle from the center of the yellow, green and blue cakes.
Use frosting to stack the the blue, green and yellow cakes together on a cake circle. Fill the hole in the center of the cakes with M&Ms. Add remaining two layers of cake and frost cake completely.
Allow cake to chill in the refrigerator for at least 30 minutes.
Place sprinkles in a large, rimmed baking sheet. Place chilled, frosted cake in the center of the pan. Using your hands or a spoon, spread sprinkles evenly over the top and sides of the cake until completely coated in sprinkles.