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
- 1/3 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
- 1/4 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.
Recipe Notes
Special equipment: 2 round cake pans 8 inches (20 cm) in diameter, cake leveler, food coloring (preferably gel or paste), colored sprinkles, palette knife (straight or offset spatula) or cake scraper (or a ruler), Lazy Susan (turntable).
If you’re looking for a recipe where the cake itself is rainbow-colored, try these cupcakes:
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?
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!
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
❤️❤️❤️
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. 😊
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!
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!
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 >:))))
You’re welcome, Mari!! I just wanted to add that rainbows symbolize togetherness, hope and change, so yay rainbows and Happy 17th Birthday!!! 🌈
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!
I found some!!! In the freezer for when I need it as there’s a UK shortage.
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
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.
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! 😃
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!
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.
Thank you. Just another question please. With the
7 ounces (200 g) 70% dark chocolate chopped, is this cooking chocolate? Many thanks 😊
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.
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.
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
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. 😘
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
You’re welcome! Thanks for your feedback! 🥰
Thank you for an amazing recipe! It was perfect!
My pleasure! I’m so glad to hear that!! 😀