Rainbow Cake Recipe

Jump to Recipe ▼
Total Time 40 minutes
Servings 12 servings

This post may contain affiliate links. See my disclosure policy.

Don’t let the extravagance fool you–it’s SO easy to make my rainbow cake recipe. With layers of colorful vanilla cake and sweet frosting, it’s a six-layered show-stopper.

Six layer rainbow cake with white vanilla frosting and sprinkles on a white cake stand with a slice removed to show colorful layers inside.
Table of Contents
  1. Why I love this recipe
  2. Key Ingredients
  3. How to make a rainbow cake
  4. Arman’s recipe tips
  5. How to store leftovers
  6. Frequently asked questions
  7. Rainbow Cake (Recipe Card)
  8. More impressive layered cakes to try

Why I love this recipe

Arman Liew

If you’ve made my Harry Potter cake, you’ll know I did a cake-decorating module during culinary school, and it sparked a fire in me to recreate those showstopping cakes you see on social media and in cake stores. Namely, the rainbow cake.

For such an impressive-looking cake, it’s deceptively easy to make. I started with my tried-and-true vanilla cake and tested how it baked with food coloring and gels.

Surprisingly, gels performed significantly better, without extra liquid to throw off the batter or bleeding into the batter. Here’s why you should make it:

  • Actually delicious. I’ll be honest- many impressive-looking cakes don’t taste very good. This one is moist, fluffy, and has a gorgeous vanilla flavor.
  • Easy to make ahead. Since I don’t have six cake pans lying around, I’ll usually bake the cake layers in batches and refrigerate them until I’m ready to assemble. 
  • Pantry staples only. I don’t use any eggs, butter, or milk, and any frosting works, including store-bought options.

Key Ingredients

Here’s what goes into this rainbow cake recipe, along with my kitchen notes. Full measurements are in the recipe card below.

  • All-purpose flour. Sift it to remove any clumps. I successfully tested this with two gluten-free flour blends (Bob’s Red Mill & King Arthur gluten-free flour).
  • Sugar. I used white sugar so the colors were as vibrant as possible (brown sugar can darken them and keep the middle too moist).
  • Baking soda. This reacts with the vinegar, creating gas bubbles in the cake batter to help the layers rise and become fluffy. Don’t use baking powder, as it won’t have the same effect. 
  • Vinegar. Use white vinegar or apple cider vinegar.
  • Vegetable oil. Bon Appétit agrees: cakes made with vegetable oil are the most moist and have the best crumb. If you don’t have vegetable oil, use avocado oil. 
  • Vanilla extract. A must for vanilla cake, especially to bring out the strong vanilla flavor.
  • Water. To shape the cake batter. You can also use almond milk or whole milk, though I didn’t notice a difference texture-wise. 
  • Food coloring. I used red, orange, yellow, green, blue, and purple. Try using gel food coloring rather than liquid, since it’s more concentrated, gives the cake a more vibrant color, and doesn’t add extra liquid to the batter (I swear by Wilton).
  • Vanilla frosting. I used Betty Crocker vanilla frosting, which is naturally dairy-free, but any vanilla frosting works.

How to make a rainbow cake

whisking the cake batter in a mixing bowl.

Step 1- Make the cake batter. Combine the dry ingredients in a large bowl, add the wet ingredients to the flour mixture, and whisk to combine. 

six bowls of cake batter with food gel added in- red, orange, yellow, green, blue, and purple.

Step 2- Add color. Pour the mixture evenly into six bowls and add 3-4 drops of food coloring in each. Mix to distribute the color. 

frosted cake with decorations on top.

Step 3- Bake. Pour the individual cake colors into the cake pans and bake until a toothpick comes out mostly clean. Let them cool briefly, then transfer them to a wire rack to finish cooling. 

slice of rainbow cake.

Step 4- Assemble. Place the purple layer on a cake plate, followed by a thin layer of frosting. Repeat using the blue layer, green, yellow, orange, and red cake layers, with frosting between each. Cover the cake with the remaining frosting and decorate as desired. 

Arman’s recipe tips

  • Line each pan with parchment paper, not just grease it. Eirini in the comments had layers stick to the pan, and parchment paper is the fix. 
  • Use a kitchen scale. Each cake should weigh around 6 to 7 ounces (180-200 grams) of batter. Eyeballing it leads to uneven layers that are noticeable when sliced.
  • If you don’t have 6 cake pans, bake the layers in batches and refrigerate them until you’re ready to assemble. 
  • Domed cake layers? Use a serrated knife to cut them evenly. 
  • Add a crumb coat when frosting. A ‘crumb coat’ is a thin layer of frosting that helps the crumbs stick to the cake so they’re not visible when you add the second, thicker layer of frosting. 

How to store leftovers

Leftover cake can be kept in an airtight container at room temperature for up to 5 days or in the fridge for up to 1 week. I often freeze cake slices in plastic wrap for up to 6 months.

Slice of six layer rainbow cake showing red, orange, yellow, green, blue, and purple layers with white vanilla frosting on a cake server.

Frequently asked questions

Can the cake batter be used for cupcakes?

Yes. Instead of making a layer cake, distribute the rainbow colored cake batter evenly into a lined muffin tin (about ⅔ full). Bake in a 350ºF oven for 15 to 17 minutes or until a toothpick inserted in the middle comes out clean.

Can I make this oil-free?

For a low-fat cake, swap out the oil with equal amounts of unsweetened applesauce. I recommend keeping an eye on it as it bakes, as it can go from moist to dry very quickly.

rainbow cake recipe.

Rainbow Cake

4.87 from 30 votes
My six layer rainbow cake is as fun to eat as it is to look at! It’s easy to make using pantry-staple ingredients and decorated with vanilla frosting.
Servings: 12 servings
Prep: 10 minutes
Cook: 30 minutes
Total: 40 minutes

Video

Ingredients  

  • 4 1/2 cups all-purpose flour
  • 1/2 teaspoon salt
  • 3 cups sugar
  • 1 tablespoon baking soda
  • 1 tablespoon + 1 teaspoon vinegar
  • 1 cup vegetable oil any neutral flavored oil
  • 1 tablespoon vanilla extract
  • 3 cups water
  • 1 tablespoon food gel coloring * See notes
  • 4 cups vanilla frosting to decorate

Instructions 

  • Preheat the oven to 180C/350F. Grease and line six 8-inch cake pans and set aside.
  • In a large mixing bowl, combine the flour, sugar, salt, and baking soda and mix well. Add the vinegar, oil, vanilla extract, and water, and mix until smooth.
  • Distribute the batter into six small mixing bowls. Each bowl should have 6 to 7 ounces of cake batter (180-200 grams). Add 3-4 drops of each color of food coloring into them, leaving you with six cake batters of different colors.
  • Depending on the size of your oven, you may need to bake the cakes in two batches.
  • Distribute the cake batter into the greased and lined baking pans. Bake the cakes for 25-30 minutes or until a skewer comes out clean.
  • Remove the cakes from the oven and let them cool in the pan for 10 minutes before carefully transferring them to a wire rack to cool completely.
  • Once cool, assemble the cakes. Place a single cake on a flat surface and spread a thin layer of vanilla frosting on top. Add the second layer and repeat the process. Repeat this until all six cakes are layered. With the remaining frosting, spread the exterior of the cake until completely frosted. If desired, add some sprinkles or cake decorations on top. Let the cake sit for 30 minutes before slicing and serving.

Notes

Food gel coloring: I use green, blue, purple, yellow, red, and orange. 
Leftovers: Keep at room temp, covered, for 5 days, or in the fridge for one week. You can also freeze slices for 6 months. 

Nutrition

Serving: 1servingCalories: 423kcalCarbohydrates: 68gProtein: 2gFat: 16gSodium: 208mgPotassium: 39mgFiber: 1gSugar: 30gCalcium: 6mgIron: 1mgNET CARBS: 67g
Course: Dessert
Cuisine: American
Author: Arman Liew
Tried this recipe?Give us a shout at @thebigmansworld or tag #thebigmansworld!

More impressive layered cakes to try

  • Opera cake– It took me at least 20 tries (and a visit to Paris) to nail this French dessert.
  • Snickers cake– Layers of caramel, peanuts, and chocolate cake.
  • Biscoff cake– My partner’s favorite cake that’s super easy to make.
  • Vegan black forest cake– Don’t let the ‘vegan’ in the name fool you- it’s just like the classic.

Originally published March 2023

Arman Liew

I’m a three time cookbook author, culinary school graduate, and writer, and passionate about creating easy and healthier recipes. I believe you don’t need to be experienced in the kitchen to make good food using simple ingredients that most importantly, taste delicious.

4.87 from 30 votes (21 ratings without comment)

Leave a Comment

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

Recipe Rating




Comments

  1. 1 star
    I really wanted to like this recipe. I love the banana almond flour muffins you make. This cake was awful. I followed the directions to a T, but noticed the salt was missing, and then just greasing the pan meant the cakes would not budge out of the pan. I had to scrape them out and scramble for another recipe in order to make it to my son’s birthday party in time. I hate to say it, but the flavor wasn’t very good either. Apologies for sharing such a negative comment, but wanted to warn others, make sure to grease + parchment + flour just to be safe! The worst is to scramble last minute.

    1. Hi Eirini! I’m sorry it caused stress before your son’s birthday- that’s not fun. For best results the pan should be greased well, but lining it with parchment paper is another way to combat that- I’ll make a note in the recipe card. Salt missing from the recipe card is my error, I’ll fix that too. Thanks for sharing your experience and I’m glad you enjoyed the banana muffins!

    1. This looks amazing. I am making some right now on 12\23\25! Exept i am making a all purple cake with no layers.

      1. Fiona- I love that! I love that you chose that color too 🙂 Let me know how you go and I’d love to see a picture- feel free to send it to social media or to my email 🙂

  2. 5 stars
    Made for my parent’s anviversy and my family loved it. I just wish the sponge could be a bit more airy and a bit less dense, but I understand that without egg and with only vegan ingredients that this would be difficult to achieve.

    1. I have a question about the sugar in the Cake recipes?Can I use a substitute instead like Truvia or Allulose etc?My blood sugar test was borderline ,so I need to cut back.I’m praying god will help me with this.What about the eggs?Do you have any cake recipes made with eggs?It would work better if I want to make the Cake sugar free instead of Vinegar.I do prefer using eggs because it will be more moist etc.I do like your recipes a lot.Thanks.Mary C

      1. I have a few, you can check for those by searching the website. You can use allulose.

      2. 5 stars
        This was fun to make, and turned out delicious! I’m a longtime fan of your sweets and treats, so thank you!

      3. Aw, thanks so much Stephanie! I’m so glad you enjoyed this recipe and thanks for your kind words 🙂

  3. 5 stars
    Made for my parent’s anviversy and my family loved it. I just wish the sponge could be a bit more airy and a bit less dense, but I understand that without egg and with only vegan ingredients that this would be difficult to achieve.

  4. Rainbow cake looks good. I got a question, Why Vinegar in the cake and will it make it too strong for the cake? I’ve never put Vinegar in my cake whenever I make it.

    1. since baking is chemistry and there are no eggs, something needs to help the cake rise. typically eggs do 1 or 2 things–act as a bidding agent (think meatballs) and/or rising agent (cakes/cookies.) I’ve baked with vinegar a lot and you don’t taste it. it’s a helpful rising agent when pair with baking soda or powder. With all the sweetners you’re putting in the batter along with the frosting on top, youre going to cover up any possible residual flavor. Use apple cider vinegar to be safe, if you’d like.