Geometric Rainbow Layer Cake

jump to recipe

No your eyes are not fooling you! This is a real cake. This exquisite birthday vanilla flavored cake is made in the tradition of the Malaysian Sarawak Layer Cake (Kek Lapis Sarawak): one sheet cake is baked in 3-5 minute increments, in separate layers to create a large layered cake. The cake is sliced and then strategically placed in a loaf pan to create a gorgeous geometric design.

Shortly after my second daughter was born, my exhausted husband and I began a before-bed ritual: watching the tenth season of The Great British Bake Off. It’s always a great watch, especially to wind down with at the end of a tiring day with two young kids. But one night, episode seven, had me up for hours obsessively googling a cake I had seen the bakers make.

The bakers were tasked with making “Kek Lapis Sarawak” a Malaysian cake which translates to Sarawak Layer Cake. According to TBBO hosts, it would have several separate layers that were ‘grilled’, then cut, and then reassembled into intricate, precise, even layers and patterns. Wow, that sounded like A LOT of work. Were there a way to make it more home-baker friendly?

I watched the bakers spread cake batter, bake it just barely, then spread more, bake again… and repeat. Bizarre right? I wondered, could this be made with a regular white cake mix? So I tried it and I used some of the techniques I have learned from making Italian Rainbow Cookies.

Before you too get intimidated let me say two things: it turns out, “grilled” is the British way of saying broiled (but broiling a cake is weird too isn’t it? don’t worry, we’ll get there) and our layers are in no way going to be precise in cut or shape, but they will still turn out beautifully! Promise!

The cake I chose to make this was my favorite white cake recipe; you’ve seen it recently in the hidden rainbow cupcakes and probably elsewhere on the blog too. And yes, we take care to beat air into the batter and to make a nice fluffy cake but then we’re going to squash it out as this bakes and cools. I suppose another cake recipe would do but I have major trust issues when it comes to white cakes, so I stuck with this trusted one and it did not disappoint.

The way this cake bakes goes against everything you have learned about making a perfect cake: you will open the oven several times, you’ll use the broil feature and you won’t actually turn on the baking part of the oven until the very end. It’s crazy, but it’s gonna work and it’s gonna be beautiful and delicious and just wait until you slice into it and everyone ooohs and aaahhs.




Geometric Rainbow Layer Cake

Makes: 1 standard loaf pan sized cake.


  • I used a recipe I adapted ages ago from Stella Parks to make the white cake. If you have or prefer another white cake recipe, feel free to use it. I do however recommend a white cake and not a yellow as the colors will turn out more accurate.
  • Tip: I suggest you make your buttercream first because the process of baking this cake is so involved (in and out, in and out) so you can’t do it during. Another reason is that if you’ve made the buttercream first, considering it’s the same ingredients in your cake… you won’t have to wash the bowl of your stand mixer! Simply wipe it down to remove any chunks.
  • The buttercream is going to act like glue; holding the cake parts together. When you start building the loaf with the cake strips, imagine you are playing a game of tetris; vary how you arrange them so that you can get an interesting look when you are done.
  • Here are the pans I used to make this (this is my favorite brand because it cooks ALL my cakes so evenly): Fat Daddio’s Sheet Pan and Fat Daddio’s loaf pan.

Double Vanilla Cake

  • 3 cups cake flour
  • 1 1/2 sticks unsalted butter, at room temperature
  • 1/2 cup coconut oil
  • 1 1/2 cups granulated sugar
  • 3/4 teaspoon baking soda
  • 1 3/4 heaped teaspoons baking powder
  • 1/2 teaspoon fine sea salt
  • 6 egg whites
  • 1 1/2 cups buttermilk, at room temperature
  • 2 teaspoons pure vanilla extract
  • 1 teaspoon imitation vanilla

Double Vanilla Buttercream

  • 2 sticks unsalted butter, softened
  • 1 teaspoon fine sea salt
  • 2 teaspoons pure vanilla extract (or 1 tablespoon vanilla paste)
  • 1 teaspoon imitation vanilla
  • 3 cups organic powdered sugar, sifted
  • 1 tablespoon buttermilk, milk or cream


  1. Make your buttercream first: beat the butter with the salt on high until light and fluffy. Add the powdered sugar and beat to combine. Add the milk and stir the buttercream. Set it aside in an airtight container.

  2. Prepare a sheet pan (13 x 9”) with parchment paper (this will make it easier to release later).

  3. In the bowl of a stand mixer, beat the sugar, coconut oil, butter, soda, powder, salt and vanillas.

  4. Add the egg whites, one at a time, beating between each addition. Continue beating for a few minutes until mixture is very creamy.

  5. Add cake flour and turn mixer on low then drizzle in the buttermilk in. Beat on medium until all ingredients are incorporated.

  6. Divide the batter equally into six bowls, coloring each with food coloring.

  7. Turn your oven broiler on low.

  8. Spread the first color into the bottom of the prepared pan with an offset spatula. It will be a thin layer but it should cover the bottom.

  9. Set it in the oven and broil it for about 4 minutes, no more.

  10. Remove from the oven and spread the second color over the now baked first layer. Return it to the oven for another 4 minutes. (see pics below)

  11. Repeat until you have broiled your sixth layer. Now cover the pan with foil and turn the oven to 350. Bake the cake for about 5-10 minutes, until all your layers are thoroughly baked.

  12. Remove cake from oven and allow to cool completely. Prepare a loaf pan with parchment paper.

  13. Take cake out of the pan using the parchment sling. Cut off the edges of the cake and slice the remaining rectangle it into 1” strips. The strips should be as long as your loaf pan.

  14. Think of the buttercream as ‘glue’ – use a thin layer to stick the strips together. You’ll arrange your strips however you like, pausing now and then to look at the side of the loaf to see what kind of design you are creating.

  15. Once all the strips are in, cover the top of the loaf pan with parchment paper and weigh it down flat (another loaf pan filled with something heavy like butter sticks, works great here). The goal is to flatten the strips and compress them. Set it in the fridge.

  16. Remove the cake loaf from the fridge and now, cover the top and sides with buttercream.

Related Posts

Chocolate Rainbow Cake “Moonbow Cake”

Chocolate Rainbow Cake “Moonbow Cake”

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

Rainbow Babka

Rainbow Babka

A tender, vanilla flavored challah dough laced with hazelnut and white chocolate. The filling is gently colored to create a gorgeous rainbow colored babka.

9 thoughts on “Geometric Rainbow Layer Cake”

  • This cake is fun to make, stunning to look at, and tastes delicious! I made it for St. Patrick’s Day and brought some to neighbors and friends, and everybody loved it! I opted to make it with a slightly tangy vanilla bean cream cheese buttercream, which paired really well with the sweet cake. Due to the cream cheese, I stored the cake in the refrigerator, which–surprising–seemed to make the cake taste even better. Chilled, it had an almost fudgy texture (which sounds weird, since there was no chocolate) and it sliced beautifully, so all of the rainbow layers were really neat and visible.

  • I made this today and it turned out really well! A few things to note – I wasn’t sure what pan to make this in, as my sheet pans are much larger than 9 x 13, so I ended up making it in a 9 x 13 brownie pan. This worked out well, though I found that the cook times needed to be longer (5-6 mins under the broiler), presumably because the layers were thicker than if I had made it in the sheet pan. After the first layer, I poked it and thought it was cooked, but as soon as I added the second layer, I discovered the first layer was completely raw. Again, this is probably due to the size of the pan. However, I am so, so pleased with how it turned out! The colors are bright, the cake held together, and it looks so nice!

  • Gorgeous cake! The colors are so beautiful. Would you mind sharing where you bought the sprinkles featured in your photos? Thanks!

  • Can you confirm how much baking powder is supposed to be in the recipe? It says 1 13/4 and I don’t want to mess that up haha thank you!

  • This is so neat! When life is normal and I have a birthday to go to I’m going to make this!

Leave a Reply

Your email address will not be published.