The rainbow cake itself has a light and tender crumb with a mild vanilla flavor. It’s frosted in a silky smooth vanilla buttercream and then sprinkled with some fun rainbow sprinkles, great for any special occasion. For an impressive, out of the ordinary centerpiece dessert to make someone feel extra special, look no further than this bright and beautiful rainbow layered cake!

How to Make a White Cake from Scratch

Making a white cake from scratch is simple and requires ingredients that you most likely already have on hand! All-purpose flour, sugar, butter, eggs, and buttermilk are the key ingredients here. Want to know the secret to a soft and moist cake? It’s always fat. The buttermilk will contribute to the cake’s soft crumb and also give it great flavor. I would recommend the store-bought kind (and not mixing milk with a splash of vinegar to make yourself). Real buttermilk has a certain taste and fat content that will be otherwise missed.

Bake Each Cake Layer Separately 

To achieve the different colored layers of this rainbow cake, we are going to bake each layer separately. It seems like a lot of work, but I promise it’s not that labor intensive. If you don’t have exactly 6 cake pans, that’s okay! This just means you will need to bake in batches. The best part of this recipe is that the layers bake and cool really quickly so there’s not a ton of time lost.

Use Gel Food Coloring!

My personal favorite food coloring brand is Americolor Gel Food Coloring. It is by far the best, high-quality food coloring, is very true to color, and you only need a small amount to get beautiful vibrant colors! Each layer for this cake only uses about 1/4 teaspoon of color and you still get very bright colors which is why I love this brand so much. I do not recommend using any kind of liquid or powder coloring for this particular cake as the color can easily be destroyed by heat when baking.

Secrets to Even, Flat Cake Layers

If you’ve ever baked a cake before you’ll notice that many recipes suggest to spray or butter the entire pan and then sometimes even dust it in flour, but I find that this creates a dome in the center as it bakes. My trick is to not grease the pans at all. You might be thinking that’s crazy, but I promise it works! When the cake is baking, the batter can now cling to the sides of the pan and rise evenly, which creates beautiful flat layers that do not need to be trimmed. It’s also great because while baking, the cake will naturally pull away from the sides of the pan which is a great indication that the cake is done baking. For even cake layers that are the same size or very close, I highly recommend using a kitchen scale to weigh the batter before distributing it into bowls to color. When I’m done mixing the batter, I always transfer it to a large clean bowl and get the total weight of the batter and then divide that number by 6. This trick will give you perfectly even layers every time!

Tricks for Baking the Cake Layers Successfully

Look for key signs that the layers are done baking: These layers are pretty small and bake much faster than regular cakes. Look for the cake to pull away from the sides of the pan and for the tops to spring back when touched to know they are done baking.Let the layers cool before frosting: Trying to frost a cake that is still warm will be a nightmare! The good news is these layers cool pretty quickly, but if you are in a real hurry you can stick them in the freezer to flash cool them in no time.

How to Make Buttercream Frosting

Making your own frosting only requires a few steps and is easier than you think! Here are some of my top tips when making buttercream:

Use room temperature butter: If the butter is cold, it will leave chunks of butter throughout your frosting.Mix it until it’s very light and fluffy: Mixing the butter and sugar together on a higher speed will incorporate lots of air into it which gives it more volume and a lighter, airier mouth feel.

Frosting a Layered Cake Is Much Easier Than You Think 

The first step is what is called the “crumb coat”, which literally means a coat of frosting for the crumbs. This is meant to be a very light coating of frosting, so light that you can still see the cake through it. This layer of frosting is going to seal in any loose crumbs on the cake and keep them from making their way onto the outside of the cake.  After the crumb coat, it’s important to let the cake chill for 10-30 minutes to harden the frosting and really keep the crumbs from moving. I love to stick my cake in the freezer instead of the fridge as it sets up really quickly. When you are ready to fully frost the cake, I recommend using a large offset spatula which is designed specifically for frosting large cakes. If you don’t own an offset spatula, you can always use a pastry scraper or even a butter knife. You won’t be able to get super clean sides with a butter knife, but it definitely works in a pinch.  The best way I learned how to frost a cake is by using a piping bag first to pipe the frosting on to the cake. This method allows for a more evenly distributed layer of frosting and is much cleaner than just smearing it over the cake. 

Make-Ahead Cake Layers and Frosting

You can bake the cake layers ahead of time, wrap each one twice in plastic wrap, and then store them in the freezer for up to one month. When you are ready to assemble the cake, let the layers sit out at room temperature to thaw and make them easier to work with, about 10-15 minutes. You can also make the buttercream frosting ahead of time! Because the frosting has lots of powdered sugar in it, it’s completely safe to leave it out on your counter for 1-2 weeks. If it’s summertime I always recommend leaving it in a cooler part of your kitchen to keep the butter from melting. You can also store the frosting in the fridge for up to 1 month. When you’re ready to use it, leave it out at room temperature for a day or so until it’s soft again. Then give it a quick mix in the mixer for 2-3 minutes until it’s smooth and fluffy again.

Storage and Freezing Instructions

Once the cake is assembled and decorated, it’s best to store it in the fridge until you are ready to eat it. This will keep the buttercream cold which can prevent it from getting messed up if you are transporting it and prevent the butter from melting which can happen if your kitchen is a little warmer (especially in the summer!). I recommend pulling the whole cake out a few hours before cutting and serving to allow the cake to come back to room temperature which makes it easier to cut. Do you have extra slices that you want to store for later? One of my favorite tricks is to first place the leftover slices on a plate or baking tray and then freeze them for 10-15 minutes until solid. Then I wrap each slice twice in plastic wrap. You can store these wrapped slices in the fridge or freezer for a single serve slice of cake whenever you’re hungry for one!

More Cake Recipes to Ring in Your Celebration

Tiramisu Cake Key Lime Cake  Red Velvet Cake Old-Fashioned Strawberry Layer Cake Homemade Vanilla Cake

My personal favorite food coloring brand is Americolor Gel Food Coloring. I do not recommend using any kind of liquid or powder coloring for this particular cake as the color can easily be destroyed by heat when baking.

3 3/4 cups (450g) all-purpose flour 3 1/2 teaspoons baking powder 1 teaspoon salt 2 1/4 cup (500g) sugar 1 1/4 cup (282g) unsalted butter, room temperature 4 large eggs, room temperature 2 large egg whites, room temperature 1 1/2 tablespoons vanilla extract 1 1/2 cups (320g) buttermilk

For coloring the cake layers

1/2 teaspoon Americolor Gel Super Red 1/4 teaspoon Americolor Gel Lemon Yellow 1/4 teaspoon Americolor Gel Leaf Green 1/4 teaspoon Americolor Gel Royal Blue 1/2 teaspoon Americolor Gel Violet 1/4 teaspoon Americolor Gel Orange

For the vanilla buttercream frosting

2 1/2 cups (567g) unsalted butter, room temperature 5 cups (500g) powdered sugar 2 teaspoons vanilla extract 2 tablespoons 2% milk

For decoration

1 teaspoon rainbow sprinkles

If you don’t have 6 cake pans, you’ll have to bake the layers in multiple rounds. Scrape down the sides and bottom of the bowl well to make sure everything is incorporated then mix it one more time to make sure it’s well combined. Add one gel color to each bowl and use a spoon to mix the color into the batter. You will have yellow, blue, green, purple, orange, and red batters. Use a small offset spatula to spread the batter around to evenly fill each pan. Bake three pans at a time for 17 minutes until the tops spring back when touched and the cake starts to pull away from the sides of the pans. Repeat until all 6 cake layers are baked and cooled. Add the blue layer and spread another layer of frosting (about 1/2 cup). Continue this same pattern with the green, yellow, and orange layer.  Top the last red cake layer up-side-down, so the top of the cake is smooth and flat. Make sure that the cake layers are centered, and the top of the cake is level. Spread a generous amount of frosting over the top and sides of the cake as before, this time leaving a thicker layer of frosting. Use the offset spatula or the back of a butter knife to smooth the sides. The freezer helps set the frosting quickly so that the sides and top are perfectly smooth! Use a piping bag with a large star tip to pipe 10-12 rosettes of buttercream along the top edge of the cake. Sprinkle the tops of the rosettes with the rainbow sprinkles. I recommend pulling the whole cake out a few hours before cutting and serving to allow the cake to come back to room temperature which makes it easier to cut.  Do you have extra slices that you want to store for later? One of my favorite tricks is to first place the leftover slices on a plate or baking tray and then freeze them for 10-15 minutes until solid. Then I wrap each slice twice in plastic wrap. Did you love this recipe? Give us some stars below!