Go Back
+ servings
Rainbow Cake Recipe

Rainbow Cake Recipe

Transform your celebrations with this eye-catching rainbow cake, featuring layers of vibrant colors and creamy, smooth buttercream that’s sure to impress and delight every guest.
Print Pin
Course: Dessert
Cuisine: American
Keyword: Rainbow Cake Recipe
Prep Time: 40 minutes
Cook Time: 40 minutes
Total Time: 1 hour 20 minutes
Servings: 12 slices

Ingredients

For the Rainbow Cake Layers:

  • 1 tablespoon vanilla extract
  • cups whole milk
  • 6 large eggs at room temperature
  • cups vegetable oil
  • 3 cups granulated sugar
  • 5 cups all-purpose flour
  • 1 tablespoon baking powder
  • ½ teaspoon baking soda
  • 1 teaspoon salt
  • Food coloring red, yellow, blue, green

For the Buttercream:

  • cups unsalted butter softened
  • ½ teaspoon salt
  • 10 cups confectioners’ sugar
  • ½ cup cream at room temperature
  • 2 teaspoons vanilla extract

Instructions

For the Rainbow Cake Layers:

  • Preheat your oven to 350°F (175°C). Prepare two or three 8-inch round cake pans by greasing them with baking spray or butter, then lining the bases with parchment paper to ensure easy release.
  • In a large mixing bowl, sift together the flour, sugar, baking powder, baking soda, and salt until well combined.
  • In a separate bowl, whisk the eggs, vegetable oil, milk, and vanilla extract until the mixture is smooth and well blended. Gradually pour this wet mixture into the dry ingredients, whisking until the batter is lump-free and consistent.
  • Divide the batter evenly among six bowls. Add food coloring to each bowl to create the different colors: red, orange, yellow, green, blue, and purple. Stir until the color is evenly distributed in each batch. Pour one colored batter into a prepared cake pan. Keep the remaining bowls in the fridge until you are ready to bake them. This will prevent premature activation of the baking powder.
  • Bake each layer for approximately 20 minutes or until a toothpick inserted into the center comes out clean. Allow the cakes to cool in the pans for 10 minutes before transferring them to a wire rack to cool completely. Repeat the process for the remaining batters, ensuring you re-grease and line the pans between batches.

For the Buttercream:

  • In a stand mixer fitted with the whisk attachment or a large bowl using a hand mixer, beat the softened butter and salt on medium speed for about 5 minutes, until the butter is fluffy and has a pale color.
  • Gradually incorporate the confectioners’ sugar, adding it one cup at a time while also adding a tablespoon of cream between additions. Continue mixing on low speed to avoid a sugar cloud. Occasionally, pause to scrape down the sides of the bowl for even mixing. Once all the sugar is incorporated, add the vanilla extract and mix in additional cream if needed to achieve a smooth, non-grainy texture. Turn up the mixer to medium-low and beat for another minute until the frosting is light and airy.

For the Assembly:

  • Carefully peel off the parchment paper from each cake layer. Place the purple cake layer on your serving plate or cake stand. Spread ½ cup of frosting evenly over the top of this layer. Next, place the blue layer on top, adding another ½ cup of frosting. Continue this layering process with the green, yellow, orange, and finally the red cake layer.
  • Once all the layers are assembled, use the remaining frosting to coat the sides and top of the cake thoroughly. Smooth the frosting to create an even surface. Chill the cake for at least an hour before slicing and serving. Store any leftovers at room temperature, covered, for up to three days.

Notes

  • If cake layers are domed, trim with a serrated knife for even stacking or use cake strips to prevent doming.
  • Cake strips help cake layers rise evenly by keeping the pan's edges cooler.
  • For accuracy, measure flour with a scale. If not available, fluff flour before spooning it into a measuring cup and leveling it.
  • Allow cake layers to fully cool before adding buttercream.
  • Chilling the cake longer helps the buttercream adhere better to the layers.
  • Use room-temperature butter for the buttercream to avoid lumps.
  • Avoid over-mixing the batter to prevent a tough, dry texture.