Skip to content

The Perfect Rainbow Cake Recipe

I know Valentine’s day isn’t even here yet but this might be a good time to master the rainbow cake recipe before St. Patricks day is upon us. Is there anything more adorable than rainbow cake? A few weeks ago I posted some rainbow cake inspiration so I could get you pumped to try making a rainbow cake (or cupcakes). Rainbow cakes aren’t exactly hard to make they just require a bit more attention. This particular rainbow cake recipe calls for lemon Swiss meringue buttercream, but you can use any buttercream. It just holds up better than anything whipped.

Make sure you have a good chunk of time to bake this cake, if it’s your first time. It has six colorful layers.

Notes: You’ll need room temperature milk and butter and egg whites for this recipe so go ahead and make sure that’s out of the fridge. You’re also going to want to find 6 bowls to distribute the batter into evenly.

Sponsored Links

Let’s begin!

Rainbow Cake Recipe


For the cake layers:

  • Vegetable shortening
  • 3 cups all-purpose flour
  • 4 teaspoons baking powder
  • 1/2 teaspoon salt
  • 2 sticks (1 cup) unsalted butter, room temperature
  • 2 1/3 cups sugar
  • 5 large egg whites, room temperature
  • 2 teaspoons pure vanilla extract
  • 1 1/2 cups milk, room temperature
  • Red, orange, yellow, green, blue, and purple gel food coloring

For the filling and crumb coat:

  • 9 large egg whites
  • 1 3/4 cups sugar
  • 2 cups (4 sticks) unsalted butter, cut into small pieces, room temperature
  • 2 teaspoons pure lemon extract

For the frosting: 

  • 5 large egg whites
  • 1 cup sugar
  • 1 cup (2 sticks) unsalted butter, cut into small pieces, room temperature
  • 1 teaspoon pure lemon extract




  1. Preheat oven to 350 degrees.
  2. Brush a six 9-inch-round cake pans (or as many 9-inch cake pans as you have you’re going to need to reuse them as necessary) with shortening. Line the bottom of each cake pan with parchment paper; brush again the pans again and set aside.
  3. In a large bowl, whisk together flour, baking powder and salt; set aside.
  4. In the bowl of an electric mixer fitted with the paddle attachment, cream together the butter and sugar.
  5. Slowly add the egg whites and mix until well combined. Add vanilla and mix until fully incorporated. Add the flour mixture and milk in two alternating additions, starting with the flour and then the milk. Mix until well combined.
  6. Divide batter evenly between six medium bowls. Add enough of each color of food coloring to each bowl, whisking, until desired shade is reached. Transfer each color to an individual cake pan. Transfer to oven and bake until a cake tester inserted into the center of each cake comes out clean, about 15 minutes (working in batches if necessary).
  7. Remove the cakes from oven and transfer to a wire rack; let cool for 10 minutes. Repeat this step until you have all six of your layers.
  8. Using a serrated knife, trim tops of cakes to make them level and even. Place four strips of parchment paper around perimeter of a serving plate or lazy Susan. Place the purple layer on the cake plate. Spread a scant 1 cup buttercream filling over the first layer with a small offset spatula so it extends just beyond edges. Repeat process with blue, green, yellow, and orange layers.
  9. Place the remaining red layer on top, bottom-side up.
  10. Using an offset spatula, cover the top and sides with a thin layer of frosting, unless you wanted to just frost the top of the cake.
  11. Refrigerate until set, about 30 minutes.
  12. Using an offset spatula, cover cake again with remaining frosting, if covering the entire cake.

Leave a Reply

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

Itsy Sparks

Itsy Sparks

Dedicated to Igniting Young Minds, ItsySparks provides knowledge to foster learning, creativity, and exploration!