This Chocolate Rainbow Cake is a real chocolate lover’s cake. It features chocolate cake layers, rainbow vanilla frosting and chocolate ganache frosting. Our birthday girl loves chocolate so for this Chocolate Rainbow Cake, I flipped the usual rainbow-colored cake layers to chocolate cake and rainbow frosting.
The cake is frosted with a decadent chocolate ganache frosting so that when you cut into the cake, the rainbow effect is a surprise. Only the fun rainbow sprinkles hint at what’s inside.
This was a birthday cake for a young teenage girl. I just love it when kids can still be kids and like things like rainbows, unicorns and sprinkles.
You can see by the photos that I made and photographed this cake twice. The first time was a practice run because I wanted to get the real birthday cake right. The recipes are all simple, fool-proof family recipes and the cake assembly doesn’t require any special decorating skills. Because I certainly don’t have any! 😉
The chocolate cake is a soft, moist and fudgy American-style chocolate cake. It is a perfect, chocolatey cake I like to make for family celebrations. I was a little worried it might be too soft and moist for cutting into thin layers but it was perfect.
In order to get enough layers to achieve the rainbow effect inside, you will need two round 8-inch (20 cm) diameter pans. They are slightly smaller than the standard cake pans in order to get enough height in the cakes and so that the cake has the right proportions.
After baking, each cake needs to be cut horizontally into three layers. An inexpensive cake leveler would be really useful for cutting the cake layers. Slicing each cake into thirds with a bread knife is not for the faint of heart. Luckily for me, it all worked out but the cake layers would look a lot cleaner and more even if you used a cake leveler.
The rainbow-colored vanilla frosting is a super-easy, not too-sweet frosting. The frosting is divided into five bowls and colored with food coloring. I find that the colors contrast beautifully with the dark chocolate cake.
Finally, the entire cake is covered in a rich and decadent chocolate ganache frosting. I love every element of this cake but the ganache frosting is my favorite part. It’s smooth and intensely chocolatey.
The ganache frosting is amazingly easy to make, aside from chopping the chocolate, which you can avoid if you use chocolate chips or good-quality chocolate wafers. Be sure to make the ganache frosting an hour or two in advance so it can cool to spreading consistency.
Have fun baking your Chocolate Rainbow Cake!
Chocolate Rainbow Cake
Ingredients
Chocolate Cake
- 1 cup (85 g) unsweetened cocoa powder
- 1 cup (240 ml) freshly brewed hot coffee or hot water
- 1 ¾ cups (245 g) all-purpose flour
- 1 ½ cups (300 g) granulated sugar
- 1 ½ teaspoons baking soda
- 1 ½ teaspoons baking powder
- ½ teaspoon salt
- 2 eggs room temperature
- 1 cup (240 ml) buttermilk
- ½ cup (113 g) butter melted
- 2 teaspoons vanilla extract
Chocolate Ganache Frosting
- 1 cup (250 ml) heavy cream
- ½ cup (113 g) butter
- ⅓ cup (70 g) brown sugar
- ¼ teaspoon salt
- 9 ounces (250 g) semi-sweet baking chocolate chopped or chocolate chips
- 7 ounces (200 g) 70% dark chocolate chopped
- 1 teaspoon vanilla extract
Vanilla Rainbow Frosting
- 1 cup plus 2 tablespoons (250 g) butter at room temperature
- A pinch of salt
- 3 ½ cups (400 g) powdered sugar sifted
- 1 tablespoon vanilla extract
- ¼ cup (60 ml) heavy cream
- Food coloring
Instructions
Chocolate Cake
- Preheat oven to 350°F (175°C). Grease and flour two 8-inch (20 cm) round cake pans and line bottoms with parchment paper.
- Whisk together cocoa powder and hot coffee in a medium sized bowl and set aside.
- In a large mixing bowl, combine flour, sugar, baking soda, baking powder and salt. Add eggs, buttermilk, melted butter and vanilla extract and beat on medium speed for 3 minutes. Scrape sides of bowl as needed. Stir in coffee and cocoa mixture. The cake batter will be very runny.
- Divide batter between the two cake pans and bake for 32-35 minutes, until cake is springy when touched and no dent is left behind. A wooden toothpick tester must come out clean.
- Cool cakes completely in pans on wire racks. When cakes are no longer warm, cover the pans tightly with plastic wrap or aluminum foil and chill for at least 2 hours.
Chocolate Ganache Frosting
- *Make Ganache Frosting ahead of time as it needs about 2 hours to cool.*
- In a medium-sized saucepan, heat and stir the cream, butter, sugar and salt over low heat until mixture nearly comes to a boil. Do not allow it to boil. Remove from heat and stir in chocolate until completely smooth. Stir in vanilla.
- Allow mixture to cool to room temperature (about 2 hours), until it reaches a spreadable consistency, stirring occasionally.
Vanilla Rainbow Frosting
- Beat the butter and salt in a mixing bowl on medium speed for 3-5 minutes until the butter appears nearly white. Add the sifted powdered sugar and vanilla and mix on low speed until blended. Scrape bottom and sides of mixing bowl with a rubber spatula and mix again briefly. Add the heavy cream and mix on medium speed until the frosting is creamy.
- Divide the frosting into five bowls (about 130 g each) and color each frosting a different color of your choice. Begin coloring with minimal amounts of food coloring. Transfer frosting to five plastic food storage bags.
Cake Assembly
- Turn chilled cakes out of pans and remove parchment paper. Slice each cake horizontally into three layers. Ideally, you would use a cake leveler to cut the layers but a long, serrated bread knife works as well. Don’t worry if the layers aren’t perfect, the cake will still be beautiful.
- Place the bottom layer on a cake platter and lay strips of parchment paper under the edges to make cleaning the platter easier afterwards.
- Cut a small corner off your first bag of frosting. Pipe the frosting onto the cake in large swirls and smooth it out with an offset spatula or a butter knife. Repeat process with remaining cake layers and frosting.
- When the chocolate ganache frosting has thickened into a pudding-like spreadable consistency, you can use it to frost the cake. If it is still too soft, you can set it in the freezer for a few minutes. If it is too hard, you can heat it in the microwave for 5 seconds.
- Start by frosting the sides of the cake. Holding your palette knife parallel to the cake, apply plenty of frosting to the sides, filling in any holes and uneven spots with the frosting. Smooth out the frosting and remove excess by scraping the sides of the cake with palette knife or cake scraper (or a ruler). Repeat until the sides are nicely covered. Then frost the top of the cake and scrape smooth.
- Decorate cake with colored sprinkles as desired. Chill cake over night before cutting into slices and serving.
Notes
If you're looking for a recipe where the cake itself is rainbow-colored, try these cupcakes:
Michela
Thanks for the reply! Last thing…could you use the chocolate ganache frosting for the filling also??
Krista
Yes, definitely! If using the ganache frosting on the outside and as a filling, you will probably need to make more than stated in the recipe above.
Sally
Hi, I need to make the sponge a couple of days before the party, how is best to store the cake for this time? Or should I add the ganache as soon as the cake is made?
Thanks
Krista
Hi, I would wrap the cake well in plastic wrap and store it chilled in the fridge until you’re ready to assemble the cake.
Michela
Hi, I’m hoping to attempt this cake but I need to make ahead of time (the day before). How would you store the cake once assembled? In the fridge over night would it be ok?
Krista
Yes! Storing in the fridge over night would actually be ideal. I would let it sit at room temperature for an hour or so before serving to allow the ganache to soften a bit.
All the best,
Krista
Irena
Hi! I am planning this beautiful cake for my daughter’s 5th birthday. Do you think I can split the chocolate batter into 6 parts and bake each separately? I am hesitant to cut it horizontally with a knife, it usually finishes ugly 🙂
Thanks!
Krista
Hi Irena,
Yes, baking the layers separately is also an option! Be sure to watch the bake really closely, and maybe also bake at a lower temperature to prevent them over baking. Baking time? Maybe 8 minutes? Check if cake springs back when touched in the middle, also try wooden toothpick test. Toothpick stuck in the center should come out completely clean.
Let me know how it works!
All the best,
Krista
Olivia K
Hi, I have just started baking this wonderful recipe, I love it!
Just a quick question, the chocolate ganache is supposed to be nice and thick so it can fit perfectly on the cake, but it’s as though it has been liquified! What should I do?
Krista
Hi Olivia,
The ganache is very liquidy when you've just finished making it. It needs to stand for a couple of hours at room temperature to thicken - you can speed this up by placing the bowl in the refrigerator. Stir the ganache every 10-15 minutes so it cools evenly and to see whether it's thick enough to spread. It's ready to use when it's the consistency of pudding. If it gets too hard to spread and starts to lose its shine, you can warm it very gently until it's shiny and smooth again.
Happy Baking!
Krista
Elaina
I just made this for my daughter's 3rd birthday...it worked perfectly and looked and tasted incredible! Thank you so much for this super fun rainbow cake recipe!
Like a lot of people these days, we were also unable to have a birthday party with friends and family. This cake helped to make her birthday still feel really special ❤️
It's a lot of cake though! We'll have to freeze some of it and enjoy it throughout the year 😋
Krista
I’m thrilled to hear that you love the cake! Thank you for leaving a comment 🙂
Beth
How do you get the frosting layers to look so crisp and clear? I cut into mine and the colors were muddied by crumbs! I don't know if it was the way I slice into it or something I'm doing during frosting (perhaps not enough frosting? I used 9 inch pans but made 1.5x the frosting)
Krista
Hi Beth,
Sorry to hear that! I have a couple thoughts.
Maybe your cake layers were a little too thin to hold together well since you used bigger cake tins?
Generally when you want really clean cake slices, you run the knife blade under hot water and dry with a paper towel immediately before each slice.
Hope that answers your question!
All the best,
Krista
Leslie
Hi Krista,
I would love to make this cake for my son's birthday, but we are going to have the party at a public park. If I don't have access to hot water (although I can bring a thermos of boiling water which may or may not stay hot), do you think I won't be able to slice it into clean slices? I don't think this will be worth my effort if the rainbow colors don't clearly show in each slice...
Thanks!
Leslie
Krista
Hi Leslie, the hot water is not critical. Just be sure to use a very sharp knife and wipe it clean with a paper towel after every slice. Happy Baking! Krista
Allison
I made this cake last year for my six year old's birthday (he loves everything rainbow) and it was such a hit my soon to be 12 year old has requested it as well!
Ying Chang
Hi Krista,
I’m planning to use this cake recipe for my son’s birthday and can’t wait. The cake looks so good.
So I only have a 9” pan, what would you suggest for cooking time or should I increase the ingredient amount?
Also, can the cakes be made ahead of time and if so, how many days?
Thank you so mucH,
Ying
Krista
Hi Ying, if baking the cake in 9-inch pans, you will need to increase the amount of cake batter or the layers will be too thin to split. I would say to double the amount to be on the safe side and also bake layers for 5-10 minutes longer. Be aware that this will be a bigger cake so you need to make more rainbow frosting to fill it and more ganache to cover it. I would make 1.5 times the amount of rainbow filling and chocolate ganache.
You definitely can bake the layers in advance, cool, wrap airtight and chill for 1-2 days or freeze for up to a month.
Ying
Thank you so much Krista! So helpful!!! Have a wonderful holiday ahead.
Ashlee
Could you use the ganache as the filling between the layers? My 7 year old wants a blue ninja chocolate cake so was going to do the color on the outside vs the Inside. Is this ganache really rich? (Or too rich for a seven year old). Thank you!!
Krista
Hi Ashlee, you could certainly use the ganache as the filling, however I agree it might be too rich for a kid‘s birthday cake. I would suggest using the chocolate frosting from this cupcake recipe as the filling: https://livingoncookies.com/the-ultimate-chocolate-cupcakes-with-chocolate-buttercream-frosting/ The chocolate frosting has sour cream in it and is very good. ☺️ Be sure to double the ingredients though so you have enough to fill a cake. Hope this helps! Krista
Natasha
Dear Krista,
I made this cake for my son’s 5th birthday and everyone was blown away!! Now I want to try something different for my daughter’s birthay so do you think is it possible to make the ganache with white chocolate?
Krista
Hi Natasha, I'm so happy to hear that! Yes, I think you should be able to replace the semi-sweet and dark chocolate in the ganache recipe with white chocolate. I'm thinking though that since white chocolate is a lot sweeter you can omit the brown sugar. If you do want to use sugar you should use white granulated sugar. Let me know how it works!
Simona
This cake is unbelievable
Made this for my daughters 4th
Waiting to cut and see how the colours Come to light
Only tricky part was slicing the cakes into layers
❤️❤️❤️
Krista
Thank you, Simona! You're right about slicing the cake into thin layers but it's doable and when you cut into the finished cake everyone will be looking at the rainbow of colors. Enjoy celebrating your daughter's birthday. 😊
Becca
How would you do it if you wanted to have 6 colours for the rainbow buttercream? Just put it on top underneath the ganache or make another layer?
Thanks!
Krista
Hi Becca, I don't know if either of those options would really work. The cake layers are as thin as they can get. You could use smaller cake pans to get more layers of cake and make the cake taller...that would be cute!
Mari
I'm taking this idea for my 17th birthday tomorrow (keto, so can't have that flour. Looks amazing though!) Thank you!
At first I was going to color the cake, but I wanted chocolate cake so I looked this up and it looks DELISH. Of course, it's less "yay rainbows" and more Pride month, but anyway.... thank you for this beautiful cake that I cannot WAIT to eat >:))))
Krista
You're welcome, Mari!! I just wanted to add that rainbows symbolize togetherness, hope and change, so yay rainbows and Happy 17th Birthday!!! 🌈
Aria
Sorry to comment again but I’ve tried three supermarkets and they’re out of whipping cream ☹️ Have you substituted it with anything else by any chance?
Many thanks!
Aria
I found some!!! In the freezer for when I need it as there’s a UK shortage.
Aria
Sorry me again! Just one last question, I promise! With the 9 ounces (250 g) semi-sweet baking chocolate chopped or chocolate chips can these be milk chocolate or would you recommend dark? Thanks so much,Aria
Krista
Hi Aria! It could be milk chocolate if you want, especially since the cake is for a 3 year old, he might prefer it if the chocolate ganache wasn't too intense flavor-wise and the milk chocolate would mellow it out. It's really up to you. It might be easiest to only use semi-sweet (16 ounces or 450g total) and the flavor will be perfect.
Aria
Fabulous, thank you once again for your advice. I haven’t made a cake for a special occasion yet! The tins arrived yesterday and I just opened them and there’s only 4 tins so will need to make the mixture then bake 4 cakes then use the remaining mixture after cooking the first 4. I’ll let you know how it goes! 😃
Aria
Hi, can I use 5 layers instead? I can buy a five layer tin so won’t need to cut the cake myself which I think I would not be able to do successfully!
Krista
Yes, you can. Baking time will be different and you will only have four colors for the rainbow buttercream in between the layers but it will definitely still work.
Aria
Thank you. Just another question please. With the
7 ounces (200 g) 70% dark chocolate chopped, is this cooking chocolate? Many thanks 😊
Krista
You can use cooking chocolate as long as it's not too bitter. I use a more decadent chocolate with 70% cocoa such as Lindt or similar because the flavor of the chocolate really stands out in the ganache.
Aria
Fabulous, thank you so much. That’s really helpful. The cake tins I have bought are 6” too so I will try and make two extra layers with the remaining mixture 😀. I’ll be making it for my little boy who is turning 3 next weekend.
Suni
This is a fantastic recipe! The ganache is so delicious, we could have eaten it all before putting it in the cake!
As my wee daughter can’t have the birthday party with her chums that she wanted... this cake will help cheer her up! She wanted rainbows 🌈 and chocolate as we are enjoying making them in support Of the NHS workers. So this is the perfect combination!
Thank you so much xxx
Krista
Thank you for sharing your sweet story about the beautiful meaning this cake had for you, Suni! I am so very touched and glad you liked my recipe. Stay well. 😘
Letty
The chocolate dough looks so rich and dark. Did you use regular cocoa or Dutch cocoa? Thank you
Krista
Hi Letty, it’s the brand most widely available here in Austria. I think you would call it Dutch cocoa, it‘s actually from The Netherlands. 😁
Sophie
This cake is awesome, looks so impressive but no fancy equipment needed. I made it for a 5 year old who wanted a "chocolate rainbow cake". I love that you just do different coloured icing rather than making 5 separate cakes! Thanks
Krista
You're welcome! Thanks for your feedback! 🥰
Trude
Thank you for an amazing recipe! It was perfect!
Krista
My pleasure! I'm so glad to hear that!! 😀