This bright and cheerful rainbow cake features six cake layers enrobed in smooth Swiss buttercream.

I think this is the perfect celebration cake for all occasions! On the outside it seems like a boring vanilla white cake. But once you slice into it, you get this surprising happy pop of color and excitement.
Rainbow cakes are great for parties and gatherings. They’re an instant crowd-pleaser! The harmony of colors appeals to everyone, young and old alike. Best of all, you can easily customize the colors to your liking or swap in different flavors or fillings.
Ingredients
This cake recipe starts with a simple vanilla cake base. Butter and vanilla are the two main ingredients that flavor this cake. As such, it is vital to use fresh butter and high quality vanilla.
The cake base is made with egg whites to produce a white cake base that allows the different colors to shine. You will need the standard cake ingredients of: sugar, flour, baking powder, baking soda, milk, and sour cream.
Coloring Cake Layers
There are several ways to color the cake. Use soft gel paste food coloring to achieve the most vibrant colors. DO not use liquid food coloring. The batter will be too thin. It will not bake off properly.
This rainbow cake recipe was specifically created for artificial dye gel food colors.
- For vibrant colors: AmeriColor Soft Gel Paste Food Color in super red, lemon yellow, electric orange, electric green, electric blue, and royal purple.
- For neon colors: use Chefmaster Neon Liqua-gel food color in neon brite pink, neon brite orange, neon bright yellow, neon brite green, neon brite blue, and neon brite purple.
I have tested this recipe with food gels made with vegetable colorants (this India Tree color set). See results below.
Step-by-Step Instructions
Recipe Tip
Cake layers may be baked ahead of time. Cool to room temperature. Individually wrap the layers in plastic wrap. Store in the freeze for up to one month. Defrost at room temperature.
Cake Assembly
Serving Suggestions
Store assembled frosted cake in the fridge until ready to serve, up to three days in advance. Take note of any highly aromatic flavors in the fridge such as onions, garlic, fermented foods, or blue cheese that may seep into the cake.
Use a sharp knife to make clean cake slices. Wipe the blade between cuts to ensure clean lines.
A cold cake will be easier to slice. However, let the cake sit out for at least 15-30 minutes before serving for best flavor and texture. The buttercream and cake need time to soften.
Rainbow cake is delicious on it’s own! Make it even better with decorative garnishes such as fresh berries, cut fruit, or edible flowers. And of course, it’s wonderful with a scoop of ice cream on the side!
More Celebration Cake Recipes
- Coconut Confetti Cake
- Chocolate Butter Mochi Cake
- Birthday Cinnamon Roll Cake
- Funfetti Doughnut Cake
Rainbow Cake
Ingredients
Cake:
- 1 cup unsalted butter, (227 g), room temp
- 2 cups granulated sugar, (400 g)
- 5 large egg whites, (165 g) about โ cup, room temp, lightly whisked
- 1 ยฝ teaspoon high quality pure vanilla extract, or vanilla paste
- ยฝ cup sour cream, (120 g), room temp
- 3 cups all-purpose flour, (390 g)
- 1 Tablespoon baking powder, (12 g)
- 1 teaspoon baking soda, (5 g)
- ยฝ teaspoon kosher salt, or fine sea salt
- 1 cup whole milk, (227 g)
- soft gel paste food colors*, see notes
Swiss Buttercream:
- 6 large egg whites, (210 g), about 1 cup
- 1 ยฝ cup granulated sugar, (300 g)
- 2 cup unsalted butter, (454 g), sliced into tablespoons, softened
- ยฝ teaspoon kosher salt, or fine sea salt
- 1 teaspoon high quality pure vanilla extract, or vanilla bean paste
Instructions
- Preheat oven to 350โ. Gather as many 8-inch round cake pans as you can find. Butter and line the cake rounds with parchment paper rounds. Set aside.NOTE: You may bake the layers in batches if you don't have enough cake pans. Clean cake pans between baking.
- In a bowl of a stand mixer with the paddle attachment, cream butter. Add sugar and continue to cream until lighter in color. Slowly add egg whites to the butter on low-medium speed. Add vanilla and sour cream. Mix until thoroughly combined.
- In a medium bowl, whisk together flour, baking powder, baking soda and salt. Alternate adding flour mixture and milk to the creamed mixture. Add the flour in three additions, beginning and ending with the flour.
- Use a kitchen scale to weight cake batter. Take the weight and divide it by 6. (My total weight was 1530 grams. Divide by 6, it was 255 grams.) Measure out equal amounts of batter into 6 small bowls. Note: If you donโt have a scale, it was roughly 3/4 cup of batter into 6 bowls.
- Add food coloring to individual bowls. I used about 4-8 drops of coloring for each. Some colors required more gel than others to get the vibrant hues I wanted. Be sure to use food gels. Adding liquid food coloring will make your batter too runny and thin.
- Transfer colored batter to prepared cake pan. Bake for 13-15 minutes until cake is set. Let cool in pan for 3 minutes before unmolding and allowing to cool completely on the racks. Continue to bake off cakes until you have completed all six colors.
Buttercream:
- Whisk together egg whites and sugar in the bowl of stand mixer. Place bowl over a pot of simmering water to create a bain-marie or double boiler. Make sure the simmering water does not touch the bottom of the bowl. Whisk mixture until it reaches a temperature of 160ยฐF.*Alternatively, if you don't have a thermometer, heat the mixture until all the sugar has melted. Test this by dipping your pointer finger into the mixture and rubbing it against your thumb. The mixture should feel smooth. You should not be able to feel the granules of sugar.
- Return bowl to stand mixer. Using the whisk attachment, beat mixture at medium speed until it has cooled to room temperature (about 75-80ยฐF) and meringue has started to form.
- Reduce to low speed. Add butter one tablespoon at a time. Add salt and vanilla. Increase speed to medium-high and continue to beat until buttercream is light and fluffy.
Assembly:
- Place the purple layer of cake on a cake board. If desired, lightly soak cake layer with simple syrup (or other flavored syrup). Spread about 1/4 cup buttercream on cake.
- Repeat adding syrup and buttercream on remaining layers (blue, green, yellow, orange, and red).
- Spread a thin layer of buttercream around the sides of cake to seal in the crumbs (crumb coat). Place in the fridge and allow to chill for 15 minutes to set buttercream.
- Coat cake with final thicker layer of buttercream. Decorate cake as desired. Store cake in the fridge until ready to serve.
Notes
- For vibrant colors use AmeriColor Soft Gel Paste Food Color ย in super red, lemon yellow, electric orange, electric green, electric blue, and royal purple. Be sure to use food coloring GEL. ย Please do not use liquid food coloring. ย The batter will be too thin and not bake off properly.
- For neon colors use Chefmaster Neon Liqua-gel food color in neon brite pink, neon brite orange, neon bright yellow, neon brite green, neon brite blue, and neon brite purple.ย
- I have tested this recipe with food gels made with vegetable colorants. Unfortunately, the heat from baking chemically alters the colors, making them very muted.ย
- Recipe makes just enough buttercream to coat cake with a thin layer. If you have a heavy hand with frosting- I suggest doubling the buttercream recipe. Excess buttercream may be stored in the freezer for up to a month.ย
- If you add the butter when the meringue is too hot, it may melt and the buttercream may not emulsify. ย If this happens, place the mixing bowl in the freezer for a couple minutes to cool down the mixture. ย Once cooled, started whipping again.
- If the butter is too cold when added to the meringue, the buttercream may end up chunky. ย Use a torch to warm the bowl or place over a bain-maire to soften the butter.
Nutrition
Nutrition information is automatically calculated, so should only be used as an approximation.
its very helpful thanks!!!