Print

Rainbow Cake Recipe

5 Stars 4 Stars 3 Stars 2 Stars 1 Star

No reviews

A spectacular Rainbow Cake featuring six colorful layers of moist vanilla cake covered in smooth vanilla buttercream. This show-stopping dessert is perfect for birthdays, celebrations, and any time you want to spread joy through baking!

Ingredients

Scale

For the Cake Layers:

  • 3 cups all-purpose flour
  • 1 tablespoon baking powder
  • ½ teaspoon baking soda
  • ½ teaspoon salt
  • 1 cup (2 sticks) unsalted butter, room temperature
  • 2 cups granulated sugar
  • 4 large eggs, room temperature
  • 1 tablespoon pure vanilla extract
  • 1½ cups whole milk, room temperature
  • Gel food coloring in red, orange, yellow, green, blue, and purple (or red and blue to make purple)

For the Vanilla Buttercream Frosting:

  • 1½ cups (3 sticks) unsalted butter, room temperature
  • 6 cups powdered sugar, sifted
  • ⅓ cup heavy cream (or whole milk)
  • 2 teaspoons pure vanilla extract
  • Pinch of salt

Instructions

Prepare for Baking:

  1. Preheat your oven to 350°F (175°C). Grease six 8-inch or 9-inch round cake pans generously with butter or baking spray, then line the bottoms with parchment paper circles. Grease the parchment too. This double preparation ensures your colorful layers come out perfectly intact.
  2. In a medium bowl, whisk together the flour, baking powder, baking soda, and salt. Set aside. This ensures your leavening agents are evenly distributed throughout the flour.

Make the Cake Batter:

  1. In a large mixing bowl or stand mixer fitted with the paddle attachment, beat the room temperature butter on medium speed for about 2 minutes until smooth and creamy. Gradually add the sugar and continue beating for 3-4 minutes until the mixture is light, fluffy, and pale in color. This creaming process is crucial for creating a tender cake texture.
  2. Add the eggs one at a time, beating well after each addition (about 30 seconds per egg). Scrape down the sides of the bowl between additions. Mix in the vanilla extract.
  3. With the mixer on low speed, add the flour mixture in three additions, alternating with the milk in two additions (beginning and ending with flour). Mix just until combined after each addition – do not overmix! The batter should be smooth and thick but pourable. Scrape down the sides and bottom of the bowl to ensure everything is incorporated.

Color the Batter:

  1. Divide the batter evenly among six small bowls (about 1 cup of batter per bowl). Use a kitchen scale for precision if you have one, or eyeball it – slight variations are fine.
  2. Add gel food coloring to each bowl: red to one, orange to another, yellow, green, blue, and purple to the remaining bowls. Start with 3-4 drops (gel is concentrated!), then mix thoroughly. Add more coloring gradually until you achieve vibrant, saturated colors. The colors should be bright before baking – they’ll stay true as they bake.

Bake the Layers:

  1. Pour each colored batter into its own prepared pan, spreading evenly with a spatula. Gently tap the pans on the counter a few times to release any air bubbles.
  2. Bake for 22-27 minutes, or until a toothpick inserted in the center comes out clean or with just a few moist crumbs. The tops should spring back when lightly pressed. Baking time may vary based on your oven and pan size – 8-inch pans may need closer to 27 minutes, while 9-inch pans bake faster.
  3. Remove from the oven and let cool in the pans for 10 minutes. Then run a knife around the edges and carefully invert onto cooling racks. Peel off the parchment paper. Allow the layers to cool COMPLETELY before frosting (at least 1-2 hours, or speed up the process by refrigerating for 30-45 minutes).

Make the Buttercream Frosting:

  1. In a large mixing bowl or stand mixer fitted with the paddle attachment, beat the room temperature butter on medium speed for 3-4 minutes until very smooth, creamy, and pale in color.
  2. Reduce speed to low and gradually add the sifted powdered sugar, one cup at a time, beating well after each addition. The mixture will look dry and crumbly at first – this is normal.
  3. Add the vanilla extract, salt, and 2 tablespoons of heavy cream. Increase speed to medium-high and beat for 3-5 minutes until the frosting is light, fluffy, and smooth. If the frosting is too thick, add more cream one tablespoon at a time. If it’s too thin, add more powdered sugar ¼ cup at a time.

Assemble the Rainbow Cake:

  1. Place your first layer (traditionally purple, but you can start with any color) on a cake board or serving plate. If your layers domed on top, use a serrated knife to level them for easier stacking.
  2. Spread about ½ cup of frosting evenly over the first layer, going right to the edges. Place the next color layer on top (blue), and repeat with frosting. Continue stacking in rainbow order: purple, blue, green, yellow, orange, red (or reverse the order – it’s your cake!).
  3. Once all layers are stacked, apply a thin “crumb coat” of frosting all over the entire cake (top and sides). This seals in any crumbs. Don’t worry about it looking perfect – you’ll barely see the cake through this layer. Refrigerate for 30 minutes to let the crumb coat set.
  4. Apply the final coat of frosting, using more generous amounts and smoothing with an offset spatula. Work from the top down, and use a bench scraper or offset spatula to smooth the sides while rotating the cake (a turntable makes this much easier). You can create a smooth finish, or leave it textured and rustic.
  5. Refrigerate the finished cake for at least 1 hour before slicing to let the frosting firm up. When ready to serve, use a sharp knife wiped clean between each slice to reveal those gorgeous rainbow layers!

Notes

  • Food Coloring Quality: Invest in good gel food colors (Wilton and AmeriColor are excellent brands). Liquid food coloring won’t create vibrant colors and can affect batter consistency.
  • Room Temperature Ingredients: This is crucial! Cold eggs and milk can cause butter to seize up, creating a lumpy batter. Set ingredients out 1-2 hours before baking.
  • Pan Alternatives: Don’t have six pans? Bake in batches. Keep unbaked colored batter covered in the fridge for up to 2 hours while waiting. Wash and re-prep pans between batches.
  • Freezing Layers: Cake layers freeze beautifully! Wrap cooled layers individually in plastic wrap, then foil. Freeze up to 3 months. Thaw wrapped in the fridge overnight before frosting.
  • Altitude Adjustments: If baking above 3,000 feet, reduce baking powder to 2 teaspoons and increase oven temperature to 375°F.

Nutrition