Preheat the oven to 350°F (175°C).
Grease and flour six 9-inch round cake pans.
In a mixing bowl, cream butter and sugar together until light and fluffy.
Add eggs one at a time, mixing well after each addition.
Combine flour and baking powder in another bowl, then gradually add to the butter mixture.
Stir in the milk and vanilla extract until well combined.
Divide the batter evenly into six bowls, adding food coloring to each.
Pour the colored batters into the prepared cake pans, layering them in a rainbow order.
Bake for 25-30 minutes or until a toothpick comes out clean.
Allow the cakes to cool in the pans for 10 minutes, then transfer to wire racks to cool completely.
Prepare the buttercream frosting and layer between the cake layers.
Frost the outside of the cake and decorate with rainbow sprinkles.