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!

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

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

Instructions
 

  • 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.