This post may contain affiliate links. For more information, read my disclosure policy.
Learn how to make a Rainbow Cake with colorful layers and buttercream frosting! This fun cake is perfect for birthdays, rainbow-themed parties, St. Patrick’s Day, or PRIDE. I’m showing you step-by-step how to make a rainbow layer cake that will wow your friends and family!
Best Rainbow Cake – it really is easy!
Can I tell you how much I love this rainbow cake recipe? It’s one of my favorite cakes to make because it looks just like a regular layer cake from the outside, but when you slice it, you get all of those colorful rainbow layers.
Making a rainbow cake is not hard – it just takes time! Trust me, this cake has a wow factor and is super fun to serve for parties. I mean, how can you not smile just looking at it? It’s so cute!
We are using white cake mix for this cake – it makes it so much easier than trying to make cake batter from scratch. But we are doctoring it up with some extra ingredients, so the cake tastes homemade and also is sturdier.
Ingredients in Rainbow Cake
- White cake mix – for this recipe, you will need two boxes.
- All-purpose flour – adding extra flour gives the cake more structure, so the layers are sturdy.
- Large egg whites – and only egg whites! If you use egg yolks, they will muddle the cake colors, so separate the eggs before you start making the batter. Save the yolks for some scrambled eggs!
- Milk – you can use 2% or whole milk or even nondairy.
- Sour cream – leave it out, so it warms to room temperature. This makes it a lot easier to mix with the other ingredients.
- Food coloring – red, orange, yellow, green, blue, and purple. Gel food coloring will give you brighter colors.
- Vanilla buttercream frosting – you will need two batches.
What Cake Pans to Use
For this rainbow cake, you will need 8” cake pans. They should be the same kind of cake pan made by the same brand – I don’t recommend using cake pans from different brands, they should all be the same.
You can make the whole recipe and use six 8” cake pans. If you only have three pans, that’s okay, too. You can make half the recipe with three pans and then make it again. More details about that are in the recipe card!
How to Make Rainbow Cake
- Grease and flour 8” cake pans or coat them with baking spray with flour.
- Mix the cake mix, flour, egg whites, milk, sour cream, and oil with an electric mixer in a large bowl.
- Divide the batter equally among six bowls.
- Tint each batter a different color and stir well to combine,
- Pour each colored batter into its own cake pan.
- Bake the cakes at 350°F for 15 to 20 minutes. Cool the cakes in the pans before removing them.
- Once they are cooled, remove the cakes from the pans and peel off the parchment paper. If needed, level the cakes with a serrated knife.
- Place the purple cake on a cake plate. Spread the frosting over the top and then top it with the blue cake. Top it with frosting and repeat this process with the green, yellow, orange, and red cake layers.
- Frost the sides and top of the layer cake with a crumb coating which is just a thin layer of frosting. Refrigerate the cake until the frosting is set.
- Frost the cake with a second layer of frosting and then decorate it with sprinkles.
Tip From Dorothy
Expert Tips
- Batter: To ensure you divide the batter evenly among the cake pans, use a kitchen scale to measure the weight.
- Food Coloring: Gel food coloring is the best for this recipe. The colors are really vibrant!
- Cake Pans: Use the same kind of pans made by the same brand. Depending on the brand, the actual size may vary, so don’t use a mix of cake pans from different brands. Your cakes will be uneven and won’t stack well if you do.
Make Ahead Instructions
Make and bake the cake layers as instructed. Allow them to cool, and then wrap them individually in several layers of plastic wrap. Store them in the freezer for up to a month.
How to Store Rainbow Cake
Once you’ve assembled the rainbow layer cake, you can cover it and keep it in the refrigerator for three days. You can also make the frosting and freeze it in an airtight container for up to a month.
FAQ:
You can make the cake in two batches if you only have three cake pans. Mix one cake mix with ½ cup flour, 5 egg whites, ¾ cup milk, ½ cup sour cream, and ½ cup vegetable oil. Divide the batter into three bowls and use one color for each. Bake the cakes as instructed. Once the cakes are cool, remove them from the pans and use the same pans to make the other three layers using the rest of the colors.
Cakes dome on top because the edges of the cake bake faster than the middle causing the top to dome up as it bakes. Luckily, there are a couple of solutions! To stop your cakes from doming, use bake even strips. These fabric strips insulate the cake pan sides, so your batter cooks evenly. If you don’t have the strips, wait for it to completely cool. Once cooled, use a serrated knife to slice off the dome to create a flat surface on the top of your cake. Do this carefully, so you slice evenly.
Use cake pans made by one brand. Different cake pan brands vary in size, so if you use a mix of different pans, your layers may not be even and will cause your cake to lean. Divide the batter evenly among your cake pans. The easiest way to do this is to measure the weight of the batter on a scale for each cake layer. If your layers are different sizes, your cake may end up leaning.
For the brightest, most vibrant cake colors, use gel food coloring. I like Wilton or Americolor brands.
Rainbow Cake Recipe
Recipe Video
Ingredients
- 2 15.25 ounce packages white cake mix
- 1 cup (124g) all-purpose flour
- 10 large egg whites
- 1 ½ cups (345ml) milk (full fat is best but any can be used)
- 1 cup (245g) sour cream room temperature
- 1 cup (237ml) vegetable oil
- Food Coloring red, orange, yellow, green, blue, purple
- 2 recipes Vanilla Buttercream Frosting
Instructions
- Preheat oven to 350°F. Prepare six 8-inch round cake pans: grease and flour them (or spray with nonstick baking spray with flour) and line the bottom with parchment paper. *See note for how to do this in 2 batches if you don’t have 6 pans*
- Add cake mix, flour, egg whites, milk, sour cream, and oil to a large bowl. Mix on medium speed with a hand mixer until smooth.
- Divide cake batter evenly into 6 bowls. (If you have a kitchen scale, you can make sure they are even by weighing the batter in each bowl as you divide it.)
- Color each bowl a different color (one color per bowl). Stir to distribute color throughout, being sure to scrape the bottom of the bowl.
- Pour batter in each pan (one per color).
- Bake cake 15-20 minutes, or until a toothpick comes out clean. Cool completely before removing from pans.
- Remove the cakes from the pans and remove parchment paper. If needed, level the cakes with a serrated knife.
- Place purple cake layer on cake plate. Top with frosting, then add the blue layer, then green, then yellow, orange and red, making sure to frost in between each.
- Frost the outside of the cake with a thin crumb coat of frosting. Chill cake until frosting is set to the touch then do a second layer of frosting. Decorate with sprinkles as desired.
- Store cake covered in refrigerator for up to 3 days.
- Make ahead: you can make the cake layers and frosting and freeze them separately for up to one month. Be sure to wrap layers well in plastic wrap and freeze frosting in an airtight container.
Recipe Notes
- It’s important to bake these in six of the SAME pans (not different brands). Different cake pans might be slightly different and it won’t stack as well.
- If you are buying pans, buy 3. Then make the recipe in 2 batches as follows: Mix 1 cake mix with ½ cup flour, 5 egg whites, ¾ cup milk, ½ cup sour cream, ½ cup vegetable oil. Color with 3 different colors and bake as directed. Once cool, remove from pans and repeat with remaining colors.
- This cake is tall so it’s important your layers are flat. If they dome in the oven be sure and level them. I recommend using bake even strips to help the cakes from doming.
- You can use canned frosting if you want, but you’ll need about 4-5 cans.
- This would also be fantastic with Marshmallow Buttercream or Cream Cheese Frosting.
- For the most vibrant colors, use GEL food coloring. I recommend Americolor or Wilton.
Recipe Nutrition
The perfect Rainbow Cake recipe starts with a cake mix and has homemade frosting. No one will know this cake is semi-homemade and it’s the perfect rainbow colors for any rainbow party!
Made this cake for the first time since Ive always wanted to try this and 1st time cake baker here, turned out great! Actually even brought it to a friendโs baby shower. Everyone loved it! Wish I could share a pic๐
Love the look of this cake; it’s so pretty. Go rainbows!!!
This cake is so pretty! Iโve always wanted to make one. ๐๐๐
Thank you for cake strips tip. I have never used them or seen them. The cake is beautiful!!
Beautiful cake! Can’t wait to try this out. I’ve learned lighter color cake pans don’t produce a dome when I’m baking a cake. Just something I’ve noticed. J
Featured In
Rate This Recipe
Recipe Ratings without Comment