This rainbow cake just makes me feel so happy. I absolutely LOVED slicing into it to see all those gorgeous colorful layers! The best part is, this rainbow cake isn't just for looks, it tastes absolutely amazing. You won't have a crumb leftover.

This rainbow cake is very special to me. I've been waiting to make it for a long time. Ever since we found out we were pregnant with our son, Ezra, I knew I wanted to make him a rainbow cake for his half birthday (6 months).
Most people know that my husband and I had to go through a lot of infertility treatments to get our dear Avalon. I'm not ashamed of it. I think we should talk more about infertility and how common it is. So we feel less alone.
We started treatments TWO years ago. Nothing was working. My body was fighting against me. I was not in a good place emotionally or mentally.
It might sound crazy but I had a dream we had a son. I didn't tell anyone but I held onto hope as best I could.

We had honestly almost given up that we would ever have a second child. But I just felt in my soul that we had a second child waiting for us. So we didn't give up.
After all those treatments and all those medications, we ended up with ONE single egg. If you've gone through IVF you. know that the chances of that ONE egg taking are extremely low. I did not get my hopes up.
But that one egg did stick. And here we are with our beautiful baby boy. Our rainbow after the storm. Our lucky charm. The completion of our family.

What cake recipe is best for rainbow cake?
So the first thing that we have to do is bake our rainbow layers. This might sound intimidating but it's actually really easy.
We're going to use my favorite cake, white velvet. Not only. is this cake delicious, but it's also very white so it will take the color well.

If you try to add color to a vanilla cake that has egg yolks in it, those yolks will distort your colors while baking.
The other reason white velvet is perfect for making a rainbow cake is that it won't get over-mixed when you add the color.
I've added color to white velvet so many times, making everything from pink velvet, green velvet, and even blue velvet. The texture always turns out amazing.
How to make rainbow cake layers
Get your 8"x2" cake pans ready. You might not have 6 cake pans all the same size (I don't) so keep your cake batter in the fridge while your other cakes are baking. They are really thin so they bake up fast.
Coat your cake pan in a layer of cake goop and preheat your oven to 335ºF. I also put a piece of parchment paper in the bottom of my pans so that they were easier to take out of the pan since they would be so thin.

To make our rainbow cake layers, all you have to do is mix up your batter (follow the recipe below) and then divide your batter into 6 bowls evenly.
Each bowl holds 15 ounces of cake batter. I used a kitchen scale to weigh mine out so they would all be equal.

I'm using electric colors from Americolor and I'm not making an EXACT rainbow, this rainbow is more Lisa Frank style. I really like these electric colors because they make super bright neon colors and you don't have to use a lot of food color.
Colors I used
- Electric Purple
- Electric Blue
- Electric Green
- Electric Yellow
- Electric Orange
- Electric Pink

You can totally go classic rainbow and use red instead of pink, violet instead of electric purple and royal blue instead of electric blue.
Add a drop or two of color to each bowl and stir with a spoon until combined. Make sure for the green you use a little yellow and a little green so the green is more vibrant.
For the orange, use a little orange and a little yellow to make the orange more vibrant.
For the purple, add a little pink and purple to make the purple more vibrant.

Pour your batter into your cake pans (I baked three at a time and put 15 ounces of batter in each pan).
When they are done baking, they will start to pull a tiny bit from the edges of the pan (that's normal) let them cool a bit in the pan before turning out onto a cooling rack to fully cool down.
I put my cakes into the freezer for about 30 minutes to firm them up before trimming off the dome, the brown sides, and the brown bottom.
Trimming your cakes just makes the slices extra perfect and beautiful when you slice them.

How to decorate a rainbow cake
Time to decorate our rainbow cake! I'm using my easy buttercream because it comes together so fast. You could use any buttercream though like swiss meringue buttercream, Italian meringue buttercream or even cream cheese frosting.
Place your first layer onto your cake board. I'm working on a turntable to make this whole process easier.
Apply a thin layer of buttercream. Shoot for about ¼" of frosting.
Keep your spatula nice and flat so your buttercream has an even thickness.
I'm starting with the purple because that makes sense to me in my brain but you could start with the pink if you want to go in the opposite direction.

Continue frosting and stacking this way with the rest of the layers and then give the whole cake a nice crumb coat to seal in all those rainbow crumbs.

Chill your cake for 15 minutes to firm up that layer of buttercream.
Finish your cake with a final layer of buttercream and smooth it out with your bench scraper and offset spatula.

After chilling my cake, I added some fancy sprinkles to the bottom border of the cake, then I transferred my cake to a cake board.
I'm finishing this cake with a water ganache drip. I used 5 ounces of white candy melts, 1 ounce of chocolate candy melts and 6 ounces of water.

After melting, I added a few drops of electric yellow food coloring to make a gold candy melt color. I dripped this water ganache onto my chilled cake. Then painted gold with some truly mad plastics gold dust and vodka.
Make sure your mixture of dust and vodka is fairly thick, like paint so that you get good coverage.

Then I added some little swirls of white frosting on top and added some more sprinkles. I used a 1M piping tip to do the swirls.
And we're done with our rainbow cake! Doesn't it look so pretty! I love how the slices look and they are the perfect accent to this month's Ezra photo.
Be sure to check out my other popular cake recipes for more delicious tried and true cake recipes that never disappoint.

Cake Batter and Frosting Calculator
Select an option below to calculate how much batter or frosting you need. Adjust the servings slider on the recipe card to change the amounts the recipe makes.
Choose a pan type
Choose a cake pan size
(based on 2" tall cake pan)
Choose a cake pan size
(based on 2" tall cake pan)
Cupcake Tin Size
Choose number of pans
Cups of Batter Needed
8 cups
Cups of Frosting Needed
5 cups
Note: measurements are estimated based off the vanilla cake recipe using standard US cake pans and sizes. Measurements used are for 2" tall cake pans only. Your results may vary. Do not overfill cake pans above manufacturer's recommended guidelines.
Recipe

Equipment
- Stand Mixer
- Whisk Attachment
- Paddle Attachment
- Turntable
- Piping Bag
- 1M Piping Tip
Ingredients
Rainbow Cake Ingredients
- 24 oz cake flour
- 24 oz granulated sugar
- 1 teaspoon salt
- 2 tablespoon baking powder
- 1 teaspoon baking soda
- 10 oz egg whites room temperature
- 6 oz vegetable oil
- 18 oz buttermilk room temperature or slightly warm
- 12 oz butter unsalted and softened
- 1 Tablespoon vanilla extract
Easy Buttercream Frosting Ingredients
- 8 oz pasteurized egg whites
- 32 oz powdered sugar
- 32 oz unsalted butter softened but not melted
- 2 teaspoon vanilla extract
- ½ teaspoon salt
- 1 dot purple food coloring to make the buttercream white
Gold Drip
- 5 oz white candy melts
- 1 oz chocolate candy melts
- 1 oz hot water
- 1 teaspoon Truly mad plastics super gold dust
- ¼ teaspoon everclear or vodka or lemon extract
Instructions
- NOTE: It is SUPER IMPORTANT that all the room temperature ingredients listed above are room temperature and measured by weight so that the ingredients mix and incorporate correctly. Heat oven to 335º F/168º C
- Prepare six ( 8"x2") cake pans with cake goop and place a round piece of parchment paper in the bottom of the pan for easy removal of the cake
- Combine 8 oz of the buttermilk and the oil together and set aside.
- Combine the remaining buttermilk, egg whites, and vanilla together, whisk to break up the eggs and set aside.
- Combine flour, sugar, baking powder, baking soda and salt in the bowl of a stand mixer with the paddle attachment. Mix 10 seconds to combine.
- Add your softened butter to the dry ingredients and mix on low until mixture resembles coarse sand (about 30 seconds).
- Add in your milk/oil mixture and let mix until dry ingredients are moistened and then bump up to med (setting 4 on my KitchenAid) and let mix for 2 full minutes to develop the cake's structure. If you don't let your cake mix on this step your cake could collapse.
- Scrape your bowl and then reduce speed to low. Add in your egg white/milk mixture in three batches, letting the batter mix for 15 seconds between additions. Scrape down the sides again to make sure everything has incorporated.
- Divide your batter into 6 bowls. Weigh 15 ounces of batter for each bowl.
- Color each bowl with your Electric food colors. ½ teaspoon for pink for the pink layer, ¼ teaspoon yellow plus ¼ teaspoon orange for orange layer, ½ teaspoon yellow for yellow layer, ¼ teaspoon yellow plus ½ teaspoon green for green layer, ½ teaspoon blue for blue layer, ¼ teaspoon pink and ½ teaspoon purple for the purple layer.
- Bake your layers for 20-24 minutes or until the edges JUST start pulling away from the cake pan. Do not under-bake or the middle of the cake will collapse.
- IMMEDIATELY TAP PAN FIRMLY on countertop once to release the steam from the cake. This stops the cake from shrinking.
- Let cakes cool for 10 minutes inside the pan before flipping them out. The cake will shrink a bit and that is normal. Freeze your cake layers 30-60 minutes before trimming your cakes. Frost and fill with buttercream frosting.
- After your buttercream is smooth, place the cake back into the fridge for 15 minutes before you apply your drip.
- Wait for your drip to set before painting with gold paint. Finish the cake with buttercream rosettes and more sprinkles.
Easy Buttercream Instructions
- Place powdered sugar and pasteurized egg whites in the bowl of your stand mixer with the whisk attachment.
- Mix on low to combine then increase speed to high.
- Add the butter in small chunks while mixing. Continue mixing until all the butter is added in. Then add in your vanilla and salt.
- Mix on high until light and fluffy and no longer tastes like butter. Add a dot of purple food coloring to reduce the yellow appearance of the buttercream (optional).
- Remove the whisk attachment and replace it with the paddle attachment. Mix on low for 10 minutes to remove bubbles from the buttercream.
Gold Drip Instructions
- Melt the chocolate in the microwave in 15-second increments until almost fully melted.
- Add in your hot water and microwave another 15 seconds
- Stir until smooth. Then add in your yellow food coloring. Stir until smooth.
- Place water ganache into a piping bag, snip off the tip and drip the ganache around the edge of your chilled cake. After it sets, you can mix your gold dust and vodka together and paint the drip gold
Video
Notes
Cake flour sources: UK - Shipton Mills Cake & Pastry Flour







Leslie says
This looks fantastic! Just wondering how far in advance can you make it? Also, to make the six layers and I only have 3 8"x2 cake pans, what number pan should I put for the recipe as it gives you the option for 1,2or3? Thank you!
Liz Marek says
You can bake the layers ahead, wrap them in plastic, and keep them in the fridge. Since the layers are only 1" tall, use the calculator as usual and then reduce the batter by about ¼. Keep the extra batter in the fridge while the first pans bake. If you have more questions, come ask me in the Sugar Geeks community: https://community.raptive.com/sugargeeks
Thea says
Liz
Can I use this recipe to make rainbow cupcakes? My son really wants rainbow cupcakes for his birthday and I have used this recipe for a cake in the past so thought I’d ask!!
Liz Marek says
Yes! It's based on my white velvet cake, so leave out the oil for cupcakes. Layer a little of each color in the liners for a rainbow inside. If you have more questions, come ask me in the Sugar Geeks community: https://community.raptive.com/sugargeeks
Jenny says
If I only have 9in pans, should I increase the recipe amount at all? I know if I use the recipe as is, the layers will be thinner than yours.
Liz Marek says
You don't need to increase the batter for 9-inch pans. They'll be thinner and bake faster, so keep an eye on them. If you have more questions, come ask me in the Sugar Geeks community: https://community.raptive.com/sugargeeks
Kelli says
This cake is so delicious and was really fun to make. Thank you so much for sharing the recipe.
Meghan says
It’s time for me to comment since I come back to this recipe every December for my son’s Christmas birthday. This is year 4 and it’s a hit every single time! It’s unlike any “vanilla” cake I’ve ever had and is as decadent and satisfying as any rich chocolate cake. The cake is so big (and in-demand!) it makes the rounds from the birthday party to Christmas dinner.
A few notes I’ve kept to simplify making it: the cake goop is excellent but it makes way too much and then goes mouldy before I need it again so I’ve started using cooking spray on the edges and parchment rounds on the bottom of the cake pans with success. Remember to separate the buttermilk into 8 and 10 oz (not the 18 shown in the ingredients list). And I’ve found that 80% of the buttercream recipe is enough to cover the cake but your mileage may vary.
Fingers crossed, now that I’ve officially mastered this cake, my son keeps asking for it year after year. It’s a joy to make and eat!
Sherri-Lee Dunlop says
I made this for my daughters birthday last weekend! Initially I was concerned because its a method whic seemed completely unfamiliar and I have baked a few sponges in my time, but it turned out beautifully! Im going to save it for another cake soon! it was delicious! Thanks for sharing!
Liz Marek says
So glad it turned out beautifully! Thank you.
Jenifer says
Hello, thank you for your recipe. Would it be possible to use whole eggs in the cake batter even if it alters color? If so, how many would that be?
Liz Marek says
You can, but the yolks will affect the colors. Use the same weight, 10 ounces, which is about 6 large eggs. If you have more questions, come ask me in the Sugar Geeks community: https://community.raptive.com/sugargeeks
Neesh says
If I'm freezing the cake layers a couple of days ahead of time, and bring them out of the freezer on the day I'm icing and serving the cake, how long roughly would it take the assembled cake to thaw before I can serve it? And should I let it thaw on the counter or in the fridge
Liz Marek says
Keep the assembled cake in the fridge, then take it out a few hours before serving so it comes to room temperature. If you have more questions, come ask me in the Sugar Geeks community: https://community.raptive.com/sugargeeks
Melissa says
Made this for my son’s graduation party! I wish I could attach a pic! I have only just started getting more involved in my decorating of cakes. It came out beautiful and was a real show stopper! Great recipe with cohesive easy to follow instructions.
Liz Marek says
A real show stopper, congratulations to your son! Thank you for sharing.
Donna Goetz says
At 67, I had never made a cake from scratch, but my adorable great nephew was turning 5 and wanted a rainbow cake. I saw this one on Facebook and was blown away. The only change I made was to cut out the center of all but the top and bottom layers to fill with a candy avalanche. I used exactly the same ingredients and followed the recipe to the letter. It was extraordinary and delicious. When he cut the first slice and saw those colors with the candy pouring out, he yelled, “This is the cake of my dreams!” The little kids at his party loved it and that icing was easy to make, work with and about the best taste and consistency I had ever had.
Peter says
I am excited to make this cake for my son's 5th birthday - I have (3) 9" spring form pans. I used the calculator but did not see the slider to change the amounts of ingredients. Is this something you can help with. Thank you in advance.
Liz Marek says
Use the calculator, then reduce the amount by about ¼ since these layers are only 1 inch tall. The servings slider on the recipe card is in cups, so set it to that number. If you have more questions, come ask me in the Sugar Geeks community: https://community.raptive.com/sugargeeks
Sue Prochakza says
I followed the recipe closely, including the tap on the counter when the cakes came out of the oven. They really fell in the middle. hWat might I have done wrong?
Liz Marek says
Make sure the layers are fully baked. Under-baking makes the middle collapse. Also mix the full 2 minutes after the milk and oil go in to build the structure. If you have more questions, come ask me in the Sugar Geeks community: https://community.raptive.com/sugargeeks
Michelle says
Wow this looks amazing! Could this recipe work with a gluten free flour?
Elizabeth Marek says
Yes. I like using cup4cup gluten free flour
Mabel says
I’m gluten free also what gluten free flour would you recommend? By the way I made this recipe for my son and he said it was delicious!
Liz Marek says
I like Cup4Cup gluten free flour. So glad your son loved it! If you have more questions, come ask me in the Sugar Geeks community: https://community.raptive.com/sugargeeks
Coco says
Hi there, I’m really excited to try this recipe for my daughter’s birthday. Just one problem, we don’t have cake flour here unfortunately, can I use the mix of all purpose plus cornflour method instead? Your reply is really appreciated. Cheers
Elizabeth Marek says
If thats all you can get, then it will work
Serafina Concannon says
Amazing! I made this for my daughter's third birthday. I've only ever made one type of cake before but if you follow the instructions, the recipe is easy. I didn't have all the tools either but it worked out just fine. I didn't do the decorations in the top, just added sprinkles all over it. And I didn't trim the cake so it definitely looked homemade but once it was cut open, so beautiful, and I got so many compliments on the flavor, including from people who said they weren't usually into cake (as I'm not either and I thought it was fantastic). I was looking for a cake that looked pretty but also tasted good and this is it. Only suggestion I have is to clarify that the ingredient portions listed are for a 6-layer cake. I got confused with the "handy" tool and almost doubled everything.
Vero says
Hi!
I am going to make this for my daughter’s birthday for the second year in a row - everyone LOVED it, especially the birthday girl! Any chance the cake can be baked the day before and chilled in the fridge in plastic wrap then assembled the next day?
Thank you!
Liz Marek says
Yes! Bake the layers the day before, wrap them in plastic, and keep them in the fridge. Assemble the next day. If you have more questions, come ask me in the Sugar Geeks community: https://community.raptive.com/sugargeeks