This post may contain affiliate sales links. Please read my disclosure policy.
This Rainbow Swirl Cake is made with three layers of homemade rainbow cake, then decorated with rainbow swirl frosting around the edges! It’s a moist, delicious cake that’s easy to make and perfect for a celebration, kids birthday party cake or even St. Patrick’s Day!
This post is sponsored by Challenge Butter, but all opinions are my own.
Moist & Fluffy Rainbow Cake
I’ve had so much fun making and sharing some rainbow treats lately. Between this Rainbow Swirl Cake and these Mini Rainbow Cheesecakes, I’ve fallen in love with using all the colors in a cake. It can’t help but make you happy!
And this cake is fairly straight forward to make, though it takes a little time. The time is primarily from dividing the cake batter and frosting and then dying everything six different colors. Time consuming, but easy to put together, and so worth it in the end!
How to Make a Rainbow Layer Cake
To get started making this cake, you’ll make the vanilla cake batter. After combining your dry ingredients – all purpose flour, baking powder and salt – and setting those aside, you’ll cream your butter, oil and sugar together. This can be one of the most overlooked steps when making cakes. I know because back when I first started baking, I didn’t really get it myself. Then one day I saw the difference and it clicked!
Beat the butter, oil and sugar together until you notice a very clear difference in the texture and color of the mixture. It’ll lighten in color and become light and fluffy in texture. This step adds air to batter that helps it rise and makes it lighter.
Speaking of the importance of this step, you also want to use a great quality butter. As you may already know, I’m a big fan of Challenge Butter. It’s such a creamy butter made from the freshest milk and goes from farm to fridge in just two days. Plus, there aren’t any growth hormones, nor do they use any artificial preservatives, fillers or dyes. You know you’re getting a high quality butter when you get Challenge and it shows in it’s creamy texture.
Once things are creamed, add your eggs and vanilla extract. Finally, add your dry ingredients and buttermilk by alternating adding them to the batter. Be sure not to over mix the batter. It can over develop the gluten in the flour and you end up with a tough cake. No fun!
As for the milk in this cake, I use buttermilk. It really lends a more tender cake in this instance, so I 100% recommend it. I know it’s a pain to buy a whole container of buttermilk, so do what I do and buy powdered buttermilk. It’s brilliant! You add a little of the powder to your dry ingredients, then add water when it’s time to add the liquid. The powdered buttermilk stays good for months in the fridge, so you can use it in later recipes without having to waste anything.
Rainbow Swirl Technique
When it comes to the swirl, I spent a lot of time getting the batter for the swirl of this cake just right. You don’t want to use a batter that’s too thin or the colors will mix together, rather than staying separated. And even a batter that seems thick enough can sometimes end up with things not turning out quite right. This cake batter is great – the colors stay in place and bake up just right so that when you cut into your cake, you get a nice cross section of color.
Once your batter is made, divide it evenly between 6 bowls. I used my scale to make sure everything was even, but if you don’t have a scale, it should be a little more than one cup per color.
As far as technique goes, there’s really no wrong way to do it. It’s all about the look you want. For the cake you see in the photos, I dropped spoonfuls of color at a time, shaking the pan from side-to-side between each color to help the batter spread out a bit and color more area. You end up layering the colors on top of each other a little more, giving more of a “swirled” appearance.
But you could also drop larger spoonfuls around, more like in the video below, and have them be a little more pronounced. Totally up to you. Given the nature of the cake, you could make it 10 times and it’d be a little different every time. Part of the fun!
Once the cakes bake, let them cool completely before frosting them.
Rainbow Cake Frosting
When it comes to frosting the cake, I really wanted to use white for the main color. It gives the colorful cake a bit of a “blank” background to stand out against. But of course you need to know what beauty is waiting for you inside so the rainbow piping is the perfect little hint.
To create the effect, you’ll need to add all the colors to your piping bag. To do this, grab some clear wrap and pipe a line of each color right next to each other. Roll it up and place it into a large piping bag. Pipe the frosting shells around the cake and after each shell, give the piping bag a slight turn. That little turn gives the little rotating look of the colors in the piping. One of my favorite parts of the cake!
The final Rainbow Swirl Cake is moist, delicious and so happy! It would make the perfect birthday cake, celebration cake or St. Patrick’s Day Cake! Make it your own and have fun!
Watch How To Make It
PrintRainbow Swirl Cake
- Prep Time: 2 hours 30 minutes
- Cook Time: 30 minutes
- Total Time: 3 hours
- Yield: 12-14 slices
- Category: Dessert
- Method: Oven
- Cuisine: American
Description
This Rainbow Swirl Cake is made with three layers of homemade cake with rainbow swirl frosting decorating the cake around the edges!
Ingredients
Vanilla Rainbow Cake
- 3 cups (390g) all purpose flour
- 3 tsp baking powder
- 1 tsp salt
- 3/4 cup (168g) unsalted Challenge butter, room temperature
- 1/4 cup (60ml) vegetable oil
- 2 cups (414g) sugar
- 4 eggs
- 1 tbsp vanilla extract
- 1 1/3 cups (400ml) buttermilk*
- Violet gel icing color
- Royal Blue gel icing color
- Leaf Green gel icing color
- Lemon Yellow gel icing color
- Orange gel icing color
- Red gel icing color
Vanilla Rainbow Buttercream
- 2 cups (448g) salted Challenge butter, room temperature
- 1 cup (189g) shortening
- 11–12 cups (1265g-1380g) powdered sugar
- 1 tbsp vanilla extract*
- 4–5 tbsp (60-75ml) water or milk
- Violet gel icing color
- Royal Blue gel icing color
- Leaf Green gel icing color
- Lemon Yellow gel icing color
- Orange gel icing color
- Red gel icing color
Instructions
Make the Cake Layers
- Prepare three 8 inch cake pans with parchment paper circles in the bottom and grease the sides. Preheat oven to 350°F (176°C).
- Combine the flour, baking powder and salt in a medium sized bowl and set aside.
- Add the butter, vegetable oil and sugar to a large mixer bowl and beat together until light in color and fluffy, about 3-4 minutes. Do not skimp on the creaming time. You should be able to see the change in the color and texture of the mixture.
- Add the eggs two at a time, mixing until well combined after each. Add the vanilla extract with the second round of eggs. Scrape down the sides and bottom of the bowl as needed to be sure all ingredients are well incorporated.
- Add half of the dry ingredients to the batter and mix until combined.
- Add the buttermilk and mix until well combined.
- Add the remaining dry ingredients and mix until well combined and smooth. Scrape down the sides of the bowl as needed to be sure all ingredients are well incorporated. Do not over mix the batter.
- Divide the batter evenly between 6 bowls. It should be a little more than a cup per bowl.
- Add gel icing color to the bowls (one color per bowl) and gently fold until the color is mixed throughout. You should have one bowl each of purple, blue, green, yellow, orange and red.
- Add the colored cake batter to the cake pans. Starting with the purple batter, add spoonfuls of batter around the bottom of the pan. Divide each color evenly between the three pans. Give the pan a little side-to-side shake to distribute the batter around a bit between each color. After the purple, add the blue, then green, then yellow, then orange and finally red.
- Bake for 28-33 minutes, or until a toothpick inserted comes out clean.
- Remove the cakes from the oven and allow to cool for about 2-3 minutes, then remove to cooling racks to cool completely.
Make the Frosting
- To make the frosting, add the butter and shortening to a large mixer bowl and beat until smooth.
- Add about half of the powdered sugar and mix until well combined and smooth.
- Add the vanilla extract and 2 tablespoons of water or milk and mix until well combined.
- Add the remaining powdered sugar and mix until well combined and smooth.
- Add additional water or milk as needed to get the right consistency.
Assemble the Cake
- To put the cake together, first remove the domes from the top of the cakes so they are level.
- Place the first layer of cake on a cake plate or cardboard cake circle, then top it with about 1 cup of frosting and spread into an even layer.
- Add the second layer of cake another layer of frosting.
- Add the final layer of cake on top, the frost the outside of the cake. Feel free to use my tutorial for frosting a smooth cake, if you like.
- Divide the remaining frosting between 6 bowls. I had about 1/3 cup of frosting per bowl, but you may have a little more or less, depending on how much you use to frost the cake.
- Use the gel icing colors to color each bowl of frosting, using one color per bowl.
- To make the rainbow swirl frosting border, add each color of frosting to a ziplock bag. Lay a piece of clear wrap out on the table. Trim the corner off of each ziplock bag. Pipe a thick row of each color of frosting in this order – purple, blue, green, yellow, orange, red – side-by-side onto the clear wrap.
- Fold the clear wrap over into a long log (see photos above for guidance). Twist one end closed and trim the other end, if needed, so that the frosting is right at the end.
- Put the log into a piping bag with the open end of the log going into the piping tip. I used piping tip Ateco 849.
- Begin piping shells of frosting around the top edge of the cake. After each shell is piped, turn the piping bag just a little bit before piping the next shell. As you continue piping and turning the piping bag, you’ll get a rainbow that rotates around so you see all the colors.
- To pipe shells around the bottom of the cake, create another log of rainbow frosting, add it to the piping bag and pipe shells around the bottom in the cake manner – turning the bag slightly after each shell.
- Store cake in an airtight container until ready to serve. Cake is best for 2-3 days.
Notes
* I recommend powdered buttermilk, so you don’t have to waste any leftovers.
* Use clear vanilla extract to get bright white frosting.
Nutrition
- Serving Size: 1 Slice
- Calories: 1096
- Sugar: 122 g
- Sodium: 215.1 mg
- Fat: 56.9 g
- Carbohydrates: 145.3 g
- Protein: 5.5 g
- Cholesterol: 150.9 mg
Categories
Enjoy!
Love the rainbow cake layers. Is it possible to added melted white chocolate to the batter…1/4c, 1/3c? If so, should I reduce the milk by the same amount as white chocolate liquifies?
Hard for me to say for this recipe without testing it. You could try my white chocolate cake.
Hello again,
What is the measurements if i was to make a 6 inch cake instead?
TIA
Susan
I would cut the recipe in half.
Can i make this cake a few days in advance then freeze before decorating? Will it still be moist if I did freeze it?
I haven’t tried freezing it so I can’t say from experience. But usually people seem happy with my cakes when they’ve been frozen. I would just be sure to wrap it well it in the fridge before using.
I made this for my daughter’s 3rd birthday because she wanted a rainbow cake. I changed the exterior (I’m terrible with piping) but followed the recipe for the rainbow cake interior exactly. It was PERFECT and a HUGE hit! The birthday girl and her friends were excited for the colorful cake and the parents were impressed by the taste and presentation. My daughter doesn’t remember most of the gifts she got for that birthday but now as she’s approaching her 4th she tells me “Mommy, I want the rainbow cake again!” ❤️🌈
Aww wonderful! So glad it was a hit!
This recipe is absolutely AMAZING. Made this for my son’s 4th birthday and he was in awe. Loves the rainbow. Could this recipe be used for cupcakes? Wondering how many it would make. Thanks!
Glad to hear that! Yes, it should be fine as cupcakes. It would probably make about 24.
Hi Lindsay, I want to make this cake this weekend when I have time but the birthday is not until Thursday. Hoping to freeze cake layers and then frost night before. Is that OK? Thanks
That should be fine. I’d just wrap the layers really well and thaw in the fridge before you frost it.
Hello! I was just wondering because I know how important using gel food colouring is as to not change the consistency too much. But what if I can only get my hands on liquid food colouring for the cake?
I would recommend not using too much food coloring or it could change the outcome of the came. Sorry!
Is it ok to cover it with fondant as a single tier?thank you
I don’t work with fondant much, but I think it’d be fine.
This cake is incredible!! I made it for a retirement party that was Grateful Dead/ tye die themed and had SO many compliments!! It has such a rich, delicious flavor and texture, especially with using Challenge butter! Both the cake and the frosting are excellent! I will most definitely be making this cake again!! Thank you, Lindsay!!
Awesome! So glad to hear that!
This was the best cake I’ve ever made according to my entire family!
Which of your vanilla cakes is the same recipe? It is going to be my go-to vanilla cake recipe!!! I have tried so many, but none are as moist and delicious as yours! Thanks so much!!
So glad to hear that! My vanilla cake is slightly different, but if you wanted to use this rainbow cake without the coloring, you could use it as a vanilla cake too.
OMG!!!!!! This cake looks SUPER moist and delicious!!!
Can not wait to try this recipe out and make this cake for Pride Month this June!!!!!
Linsday, girl…….. you know how to bake!!!!!!:)
I hope you enjoy it!
I made your cake batter for my grandson David’s 6th birthday and it turned out great. Thank you for the technique, it’s much more fun than a normal cake.
So glad you enjoyed it!
Hi can you tell me if you used caster sugar or granulated sugar in the recipe
Granulated
Hi can I ask was it caster sugar you used or granulated sugar. I’m going to attempt this cake for my daughter’s 9th birthday at the end of the month.
Granulated
Can you use 9” rounds
Sure
Can I convert this recipe to a neopolitan cake and any tips please 🙏
I would recommend this recipe. You can do the layers separately as I did or you can swirl the batters together. https://www.lifeloveandsugar.com/neapolitan-cake-and-an-anniversary/
Hi Lindsay. I just want to find out about how much of each gel colour should I use for the cake?
Thank you
I didn’t measure the amounts, I’m sorry. I just colored them until I liked the shade they were.