This website may contain affiliate links and advertising so that we can provide recipes to you. Read my privacy policy.

This gorgeous rainbow cake is the best way to add a splash of color to any special occasion! Not only is this cake beautiful to look at, but it’s extra moist and topped with luscious homemade buttercream. It’s the perfect dessert for birthdays, Saint Patrick’s Day, and more!

Festive cakes are my favorite. They look great, taste great, and are so fun to put together! If you’re looking for other show-stopping cakes, try this Easter cake, pink velvet cake, or homemade funfetti cake for more fun color!

Serving a piece of rainbow cake with a cake spatula.

Rainbow Layered Cake

If you’re looking for a show-stopping dessert, this rainbow cake is pretty hard to beat. I mean, look at it! It almost looks too good to eat with the wash of rainbow in each slice. My youngest is obsessed with everything rainbow, so cutting into it to reveal the colorful inside is like magic. It’s actually surprisingly easy to assemble, so don’t be intimidated!

The cake itself is vanilla flavored, but feel free to add in different flavor extracts to switch things up! The cake is super soft and moist. You’re going to love it! Each rainbow layer is frosted with my tried and true buttercream recipe, which is absolutely to die for. So not only does this rainbow cake look great, but it tastes even better! This is the best dessert for birthdays or Saint Patrick’s Day parties. (You just need to add a pot of gold!) Let’s get started with everything you need to put it together!

Ingredients for Rainbow Cake

Between the cake and the frosting, this rainbow cake uses a bunch of simple ingredients. As long as you have food coloring, you may have everything you need to put it together! Check out the recipe card below for exact measurements.

For the Vanilla Cake:

  • Cake Flour: I used cake flour here, but you can also use all-purpose flour. It will just give the cake a slightly different crumb.
  • Granulated Sugar: Gives each layer of cake the perfect sweetness.
  • Baking Powder and Baking Soda: Helps the cake turn out light and airy.
  • Buttermilk: My secret weapon for cakes! It makes them extra tender and also adds a slight tangy flavor.
  • Milk: I recommend using whole milk. The higher the fat content, the more moist your cakes will be.
  • Vanilla Extract: Adds a sweet, floral flavor.
  • Vegetable Oil: For moisture!
  • Egg Whites: Help to leaven the cake and add structure. Make sure they’re at room temperature so they mix together smoothly with the batter.
  • Food Coloring: I like using gel food coloring to color my cakes because it makes them so vibrant!

For the Buttercream Frosting:

  • Unsalted Butter: Let it come to room temperature before you use it. This way, you’ll end up with smoother frosting.
  • Powdered Sugar: For sweetness and a smooth texture.
  • Vanilla Extract: Gives the frosting a delicious flavor.
  • Salt: Just a pinch!
  • Heavy Cream: Adjusts the consistency of the frosting.
  • Food Coloring: You can use a drop of purple food coloring to counteract the yellow in the frosting. This will make it look nice and bright!

How to Make a Layered Rainbow Cake

I know it may look like a lot of steps, but this easy rainbow cake is actually very straightforward to make! Whip this up for your next party and everyone will be impressed.

  1. Preheat Oven, Prep Pans: Preheat the oven to 350 degrees fahrenheit. Spray 6 8-inch cake pans with cooking spray and line with parchment rounds. If you don’t have 6 cake pans, use what you have and bake in batches. I baked two cakes at a time.
  2. Batter Mixture: In a large bowl whisk together the flour, sugar, baking powder, and baking soda. Add in the buttermilk, milk, vanilla and oil and mix until just combined.
  3. Whip Egg Whites: In another large bowl whip the egg whites until you reach medium stiff peaks.
  4. Combine: Fold the egg whites into the batter until no streaks of whites remain.
  5. Add Food Coloring: Separate the cake batter equally into 6 different bowls. I had about 275 grams of batter per bowl. Then color the batter red, orange, yellow, green, blue, and purple.
  6. Bake: Bake in prepared pans for 15-18 minutes, until the center of the cake springs back when lightly pressed on.
  7. Chill: Let the cakes cool completely before wrapping with plastic wrap and stored flat in the freezer overnight. This will make them easier to stack and frost.

Making the Buttercream Frosting/ Assembling the Rainbow Cake

  1. Mix Ingredients: Beat the butter and powdered sugar together in a stand mixer until combined. Then add the vanilla, salt and 4-5 tablespoons of cream. Beat until smooth. Add more cream if needed to reach a softer, smoother consistency.
  2. Separate: Reserve 2 cups of white frosting, and then tint the rest of it light blue. 
  3. Layer: Start with the purple cake round on the bottom and add a thin layer of frosting. Then top with the blue round followed by a thin layer of frosting. Repeat with the rest of the rounds until you have them stacked purple, blue, green, yellow, orange, and finishing with red on top. Then add a thin layer of frosting over the outside of the cake to form the crumb coat. Chill for 20 minutes.
  4. Frost: Once the crumb coat has chilled, use a frosting spatula to smooth the frosting around the rainbow cake. Avoid lifting the spatula straight off the cake and instead swipe it along the cake until it comes off. This will help avoid pulling off the sides of the cake and getting crumbs in your buttercream. 
  5. Add Decorations: Use a piping bag fitted with a very large round tip to pipe white clouds around the top and cascading over the top edge of the cake.
2-photo collage of buttercream being made and frosted in between each cake layer.

Tips and Tricks

Here are a few of my favorite tips on achieving the perfect layered cake. It’s sure to impress all of your guests (and make their stomachs happy!)

  • Thickness of Layers: To achieve flatter cakes, let them cool in the pan for about 5 minutes before flipping upside down on a cooling rack. Let cool for 20 minutes before flipping back right side up. This will give you a nice flat top on your cake layers.
  • Freezing Layers: Freezing the cake layers overnight helps prevent the cakes from crumbling as you frost them.
  • Adjusting Colors: You can control how much coloring you want in the cake layers and frosting. It can be bright, neon, or pastel! Whatever shades you want for your rainbow, go for it. 
  • Remove Excess Frosting: When frosting the cake, scrape off excess frosting on the side of a bowl as you go so you have a clean edge to smooth better with.
  • Use Homemade Cake: This cake is best made from scratch. Store-bought cake mixes lack the structure needed to support so many layers. If you use cake mix, you will risk ending up with a crumbling cake that won’t hold it’s shape as you stack and cut into it.
A whole rainbow cake with a slice cut out of it.

How Long Does Rainbow Cake Last?

Store leftover cake in an airtight container for up to 2 days at room temperature or up to 7 days refrigerated.

A slice of rainbow cake on a blue and white plate.

Cake

  • 3 ⅓ cup cake flour
  • 2 ¼ cup granulated sugar
  • 2 ¼ teaspoon baking powder
  • ¾ teaspoon baking soda
  • 1 ½ cup buttermilk
  • cup milk
  • 3 teaspoons vanilla extract
  • ¾ cup vegetable oil
  • 6 egg whites room temperature
  • Food coloring

Buttercream

  • 2 pounds unsalted butter room temperature
  • 16 cups powdered sugar
  • 2 tablespoons vanilla extract
  • 1 pinch salt
  • 1/3 cup heavy cream more if needed
  • Food coloring

  • Preheat the oven to 350 degrees fahrenheit. Spray 6 8-inch cake pans with cooking spray and line with parchment rounds. If you don’t have 6 cake pans, use what you have and bake in batches. I baked two cakes at a time.

  • In a large bowl whisk together the flour, sugar, baking powder, and baking soda. Add in the buttermilk, milk, vanilla and oil and mix until just combined.

  • In another large bowl whip the egg whites until you reach medium stiff peaks.

  • Fold the egg whites into the batter until no streaks of whites remain. Separate the batter equally into 6 different bowls. I had about 275 grams of batter per bowl. Color the batter red, orange, yellow, green, blue, and purple.

  • Bake in prepared pans for 15-18 minutes, until the center of the cake springs back when lightly pressed on.

  • Let the cakes cool completely before wrapping with plastic wrap and stored flat in the freezer overnight. This will make them easier to stack and frost.

Buttercream

  • Beat the butter and powdered sugar together in a stand mixer until combined. Add the vanilla, salt and 4-5 tablespoons of cream. Beat until smooth. Add more cream if needed to reach a softer, smoother consistency.

  • Reserve 2 cups of white frosting, and tint the rest of it light blue.

  • Start with the purple cake round on the bottom and add a thin layer of frosting. Top with the blue round followed by a thin layer of frosting. Repeat with the rest of the rounds until you have them stacked purple, blue, green, yellow, orange, and finishing with red on top. Add a thin layer of frosting over the outside of the cake to form the crumb coat. Chill for 20 minutes.

  • Once the crumb coat has chilled, use a frosting spatula to smooth the frosting around the cake. Avoid lifting the spatula straight off the cake and instead swipe it along the cake until it comes off. This will help avoid pulling off the sides of the cake and getting crumbs in your buttercream.

  • Use a piping bag fitted with a very large round tip to pipe white clouds around the top and cascading over the top edge of the cake.



Serves: 12

Calories1497kcal (75%)Carbohydrates225g (75%)Protein8g (16%)Fat66g (102%)Saturated Fat41g (205%)Polyunsaturated Fat3gMonounsaturated Fat17gTrans Fat2gCholesterol174mg (58%)Sodium146mg (6%)Potassium219mg (6%)Fiber1g (4%)Sugar197g (219%)Vitamin A2048IU (41%)Vitamin C0.04mgCalcium106mg (11%)Iron1mg (6%)

All nutritional information is based on third party calculations and is only an estimate. Each recipe and nutritional value will vary depending on the brands you use, measuring methods and portion sizes per household.

Course Dessert

Cuisine American

Keyword layered rainbow cake, rainbow cake

Alyssa Rivers

I am Alyssa and the blogger behind The Recipe Critic. I started my blog in June of 2012 as a place to share my passion for cooking. I love trying new things and testing them out with my family.

Read More Posts by Alyssa

Categories