Filed under: Bundt Cakes
April 1, 2022

Chocolate Rainbow Cake “Moonbow Cake”

A rich chocolate bundt cake with a tight, dense crumb and a gorgeous rainbow surprise inside! 

5 from 7 votes
Yield: 12
Jump to recipe
chocolate rainbow cake

The chocolate version of my hidden rainbow cake: A rich chocolate bundt cake with a tight, dense crumb and a gorgeous rainbow surprise inside! 


chocolate rainbow cake


I’ve made the vanilla version of this cake countless times for my now 5yo daughter. She almost always asks to top it with a dark chocolate glaze but to date I haven’t been able to bring myself to do it (I’ve always wanted something more classic or colorful to match the interior, esp since we have chocolate in almost everything else!). 


For Christmas our 2yo was gifted a kids book about the science of rainbows and we learned that there’s such a thing as a moonbow (!)… a big gorgeous rainbow surrounded by a dark sky.  Immediately I thought to do a moonbow version of the cake by *just* coloring the outside. I could dye it a dark color, but cocoa is my favorite food coloring, for obvious reasons. Of course, it turned out it’s been done before, but ours is a homemade, from scratch, totally delicious version. Plus that signature sam arch! And here was an opportunity to give it the chocolate glaze she wanted.


I ended up making this one for st Patrick’s day and it was the ‘pot of gold’ at the end of Lily’s annual rainbow treasure hunt. Everyone happily devoured it. I know there are some little ones out there who would also love this, so I wanted to share it here too. 


Key Ingredients for Chocolate Rainbow Cake 


Cake Flour: Made of a finely milled wheat and mixed with cornstarch this will gives us a very tender crumb. 


Coconut Oil: This is to replace some of the fat lost from removing the egg yolks. Unrefined does not have the coconut taste so it won’t bother you here. 


Dutch process cocoa: You could also use black cocoa but absolutely avoid using natural here as it will mess with the chemistry of the cake (natural cocoa is acidic). Use a good quality cocoa with a higher fat percentage (Guittard Rogue or Ghiradelli Dutch are both have 20-22% fat content, which is ideal). Low fat cocoas will make the cake rather dry. Read here for more info about cocoa fat. 


Food coloring: Gel colors are best but the wilton water based ones are pretty great too. 


Kefir or buttermilk: I use these interchangeably but if the kefir is very thick I might water it down slightly so it has the consistency of buttermilk. Milk and lemon/vinegar is not a good substitute as it’s often more acidic than buttermilk and a lot less creamy. 


chocolate rainbow cake


How to make Chocolate Rainbow Cake “Moonbow Cake” 

The first step is to make the batter: we’re going to make a white cake batter much like we do in the original hidden rainbow cake. 


Beat the sugar, oil and butter really well together. It should be very light and fluffy – about five minutes. Add the salt, leavening and vanilla in this step. 


The egg whites go in one at a time, allowing each to fully incorporate before another. Sift over the cake flour and add most of the buttermilk (save 20g). Beat to combine. 


Then separate the batter: you want a heaped ⅓ cup in five small bowls, these will be your rainbow colors. And with the remaining batter in the mixer bowl, add the cocoa, remaining buttermilk and an egg yolk. Cocoa dries out a batter so we’re adding these to make sure it stays nice and moist. 


Building the rainbow: Most of the chocolate batter goes straight into the ring mold, you’ll reserve just enough to cover the rainbow part. 


Once you have the rainbow colors in piping bags, begin piping the red into the cake pan, making a big ring in the center – leaving just enough space on the outside so you can see the chocolate batter. Flatten it out with the back of a spoon then do the orange, making sure that you can see the red on either side. Each ring decreases in width so when it bakes they rise up and surround them to form the arch. 


Once the purple is in and flattened, add the rest of the chocolate batter – carefully so as not to mess up the rainbow. Make sure it goes all the way out to the sides and completely covers the rainbow. Then, bake!



Chocolate Rainbow Cake Recipe “Moonbow Cake”

Note: You need a bundt pan or ring mold for this cake. I use this 9″ ring mold. Best to use something with a curve on the bottom so that you can get a nice arch.


Chocolate Rainbow Cake

A rich chocolate bundt cake with a tight, dense crumb and a gorgeous rainbow surprise inside!
chocolate rainbow cake
Prep Time: 30 minutes
Cook Time: 1 hour
Yields: 12
5 from 7 votes


Chocolate Rainbow Cake

  • 226 g unsalted butter
  • 75 g refined coconut oil melted or solid
  • 400 g granulated sugar
  • 1 tsp fine sea salt
  • 2 tsps baking powder
  • 2 teaspoon pure vanilla extract
  • 4 large egg whites plus 1 egg yolk
  • 360 g cake flour
  • 250 g plain kefir or buttermilk plus another 20g
  • 40 g dutch process or black cocoa

Chocolate Glaze

  • 1 cup powdered sugar 130g
  • ¼ cup dutch process cocoa
  • ¼ cup milk more as needed
  • Pinch fine sea salt
  • 1 tsp pure vanilla extract


  • Preheat oven to 350 F. Butter and flour a large bundt pan.
  • Cream butter, coconut oil, sugar, salt, vanillas and baking powder for a full 5 minutes until very light and fluffy.
  • With the mixer on, add egg whites, one at a time allowing each to be fully incorporated before adding another.
  • Add the sifted flour mixture then turn the mixer on low and slowly drizzle in the buttermilk.
  • In 5 separate bowls, add 1/3 cup of batter. Using gel food coloring add red, yellow, green, blue and purple to each bowl and stir to combine the colors.
  • To the remaining batter add the cocoa, egg yolk and additional buttermilk. Mix to combine.
  • Use most of the cocoa batter to fill your bundt pan. Leave the last bit for the top, to cover the rainbow.
  • Place each of the colored batters in a piping bag (you'll have five) and snip off the top. Use the back of a teaspoon to create a moat in the chocolate batter.
  • Pipe a red circle into the moat then use the back of a spoon to smooth it out so that it's as wide as possible while still leaving a white border on the inner and outer rim.
  • Now add the yellow, leaving a red border on either side. Each following color will decrease in width - see photos above. Spoon the rest of the chocolate batter on top with an offset spatula, careful not to smoosh the rainbow.
  • Bake for 45 minutes, checking for doneness at 40. The bundt is done when you can touch it and it springs back.
  • Allow cake to cool in pan for about 15 minutes, then invert onto a cooling rack.

Did you make this recipe?

Share & tag me on instagram @buttermilkbysam


Rate + Review

What do you think of this recipe?

Your email address will not be published. Required fields are marked *

Recipe Reviews

  1. 5 stars
    This cake was so much fun to make and tasted great! Sam offered so much helpful information to ensure that this cake turned out well. The level of care and detail put into this entire post and recipe is so appreciated!

  2. 5 stars
    Really wonderful cake! I definitely recommend using a large Bundt pan similar to what the recipe shows above and not a fancy Bundt pan as you’ll want to have the extra width to space for the rainbow. I went with full butter and used buttermilk and the cake turned out awesome! The glaze was tasty too! thank you for the recipe!

  3. 5 stars
    This cake is so good, and was so fun to make! I haven’t fully perfected the nice arc shaped rainbow, but even my curved-ish one looked cute! And it gives me ideas of different designs that could be done inside the cake! Love it!

  4. 5 stars
    I made this for my daughters 4th birthday. First of all, and most importantly, it was DELICIOUS. It gives off fudgy brownie vibes while still remaining light and spongy somehow. This is truly a recipe I want to perfect and make for many birthdays. I had a little trouble with layering the colors into an actual rainbow, it kind of ended up more tie dyed. But I think that was just an issue with technique on my end (I don’t recommend doing this with a 5 month old strapped to you, if you can help it ?). It was also my first time working with gel colors and multiple batters, so take all of my troubles with a grain of salt. This recipe is a ten, either way

  5. Oh, man, the swoop/arch is unreal here, such a clever technique to pull out this result without a lot of bleeding and muddling between layers. Of course, the chocolate is forgiving but the layers still have to hold up to the weight of their neighbors. Glad to see you pull this off with signature, scratch style.

    And thank you to your daughter for her discovery of the moonbow, a phenomenon often seen but not as often identified as such, nor celebrated in its own right.