Prepare the Cake Pans
Preheat your oven to 350°F (175°C). Grease and flour 3-4 round cake pans, or line them with parchment paper for easier removal. If you only have 2 pans, bake the layers in batches.
Make the Cake Batter
In a medium bowl, whisk together the flour, baking powder, and salt. In a large mixing bowl, cream the softened butter and sugar together until light and fluffy, about 3-4 minutes. Add the eggs one at a time, mixing well after each addition, then add the vanilla extract.
Combine Wet and Dry Ingredients
Gradually add the dry ingredients to the wet ingredients, alternating with the milk. Start and end with the dry ingredients, mixing just until combined. Be careful not to overmix.
Divide the Batter and Add Food Coloring
Divide the batter equally into 6 bowls. Add a few drops of food coloring to each bowl to create your rainbow colors. Mix each batch of batter until the color is evenly distributed.
Bake the Cake Layers
Pour each color of batter into the prepared cake pans. If you’re using 3 pans, you’ll have two colors per pan. Bake the cakes for 20-25 minutes, or until a toothpick inserted into the center comes out clean. If you're using multiple pans, bake in batches. Let the cakes cool in the pans for 10 minutes, then transfer them to a cooling rack to cool completely.
Prepare the Buttercream Frosting
While the cakes are cooling, make the buttercream frosting. In a stand mixer or with a hand mixer, beat the softened butter until creamy. Gradually add powdered sugar, 1 cup at a time, beating on low to incorporate. Add vanilla extract, heavy cream, and a pinch of salt, then beat on high for 3-4 minutes until fluffy.
Assemble the Cake
Once the cakes are completely cool, level them if needed to create even layers. Place the first cake layer on a serving plate or cake stand. Spread a thin layer of buttercream frosting on top. Add the second cake layer and repeat, stacking all the layers. Cover the entire cake with a crumb coat of frosting (a thin layer to seal in the crumbs) and refrigerate for 20-30 minutes.
Frost the Cake
After the crumb coat has set, apply a final thick layer of buttercream frosting to the top and sides of the cake. Use a spatula to smooth out the frosting or create a textured finish.
Decorate
For a fun, colorful touch, decorate the top and sides of the cake with sprinkles, edible glitter, or extra piping of frosting.