Go Back

Rainbow Cake Recipe

This vibrant Rainbow Cake features layers of colorful cake, filled with buttercream frosting, and topped with sprinkles. A fun and festive dessert perfect for birthdays or celebrations!

Ingredients
  

  • For the Cake:
  • 2 ½ cups all-purpose flour
  • 2 ½ teaspoons baking powder
  • ½ teaspoon salt
  • 1 cup unsalted butter softened
  • 1 ½ cups granulated sugar
  • 4 large eggs
  • 2 teaspoons vanilla extract
  • 1 cup whole milk
  • Food coloring red, orange, yellow, green, blue, and purple
  • For the Buttercream Frosting:
  • 1 cup unsalted butter softened
  • 4 cups powdered sugar
  • 2 teaspoons vanilla extract
  • 2-3 tablespoons heavy cream or milk
  • Pinch of salt

Equipment

  • 6-inch or 8-inch round cake pans (at least 3-4)
  • Electric mixer or stand mixer
  • Mixing bowls
  • Whisk
  • Spatula
  • Piping bag (optional)
  • Cooling rack
  • Toothpicks or cake tester

Method
 

  1. Prepare the Cake Pans
  2. 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.
  3. Make the Cake Batter
  4. 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.
  5. Combine Wet and Dry Ingredients
  6. 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.
  7. Divide the Batter and Add Food Coloring
  8. 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.
  9. Bake the Cake Layers
  10. 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.
  11. Prepare the Buttercream Frosting
  12. 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.
  13. Assemble the Cake
  14. 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.
  15. Frost the Cake
  16. 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.
  17. Decorate
  18. For a fun, colorful touch, decorate the top and sides of the cake with sprinkles, edible glitter, or extra piping of frosting.