Rainbow Layer Cake Recipe

Vibrant, moist vanilla cake layers in every color of the rainbow, stacked high with velvety buttercream for a celebration-worthy dessert that's as delicious as it is visually stunning.
Difficulty:
Intermediate
Prep Time:
60 mins
Cook Time:
30 mins
Serves:
1 cake (16 slices)
An overhead shot of a stunning six-layer rainbow cake on a white ceramic cake stand, displaying perfectly even layers of vibrant red, orange, yellow, green, blue, and purple separated by thin lines of creamy white buttercream. A slice has been removed to showcase the striking rainbow interior against the pristine white frosting exterior. Soft natural light streams from a side window, highlighting the cake's smooth frosting texture and creating gentle shadows. Rainbow sprinkles are scattered artfully around the base of the cake stand on a light marble countertop, while a silver cake server rests nearby, its edge bearing traces of the colorful layers.

Ingredients

<ul class="ingredients-main-list"><li class="ingredients-single-item">375g unsalted butter, softened</li><li class="ingredients-single-item">375g caster sugar</li><li class="ingredients-single-item">6 large eggs, room temperature</li><li class="ingredients-single-item">375g self-raising flour</li><li class="ingredients-single-item">2 tsp vanilla extract</li><li class="ingredients-single-item">6 tbsp whole milk</li><li class="ingredients-single-item">Gel food coloring in red, orange, yellow, green, blue, and purple</li><li class="ingredients-single-item">For the buttercream frosting:</li><li class="ingredients-single-item">350g unsalted butter, softened</li><li class="ingredients-single-item">700g icing sugar, sifted</li><li class="ingredients-single-item">2 tsp vanilla extract</li><li class="ingredients-single-item">3-4 tbsp whole milk</li><li class="ingredients-single-item">Rainbow sprinkles for decoration (optional)</li></ul>

Equipment

<ul class="equipment-main-list"><li class="equipment-single-item">6 identical 20cm (8-inch) round cake tins (or bake in batches)</li><li class="equipment-single-item">Electric mixer (stand or handheld)</li><li class="equipment-single-item">Digital kitchen scale</li><li class="equipment-single-item">Offset spatula</li><li class="equipment-single-item">Cake turntable (optional but helpful)</li><li class="equipment-single-item">Serrated knife for leveling cakes</li></ul>
BAKE SMARTER

Kitchen Converter

Quickly switch between common baking units without leaving the recipe.

Convert
Result—

Volume uses US cups, tablespoons, and teaspoons. Converting weight to volume depends on the ingredient.

Directions

<ol class="no-list-style"><li class="MethodStepper"><h4 class="step-title">Step 1</h4>Preheat your oven to 180°C (160°C fan). Grease and line the base of your cake tins with parchment paper. If baking in batches, prepare as many tins as you have available. Proper preparation prevents sticking and ensures even baking.</li><li class="MethodStepper"><h4 class="step-title">Step 2</h4>In a large bowl or stand mixer, cream together the butter and sugar until very pale and fluffy, about 5 minutes. This incorporates air into the mixture, creating a lighter cake texture. Don't rush this step – proper creaming is crucial for a tender crumb!</li><li class="MethodStepper"><h4 class="step-title">Step 3</h4>Add the eggs one at a time, beating well after each addition. If the mixture looks like it's starting to curdle, add a tablespoon of the measured flour to stabilize the emulsion. Stir in the vanilla extract.</li><li class="MethodStepper"><h4 class="step-title">Step 4</h4>Gently fold in the flour using a large metal spoon or rubber spatula, adding the milk as you go to achieve a soft dropping consistency. The batter should fall from the spoon but not be runny – this balance ensures your cakes will be moist but properly structured.</li><li class="MethodStepper"><h4 class="step-title">Step 5</h4>Divide the batter equally into six bowls (about 200g per bowl for precision). Add gel food coloring to each bowl – red, orange, yellow, green, blue, and purple – stirring thoroughly to achieve vibrant, even colors. Use gel rather than liquid food coloring as it provides more intense color without affecting the batter consistency.</li><li class="MethodStepper"><h4 class="step-title">Step 6</h4>Transfer each colored batter into prepared cake tins, spreading evenly to the edges. If baking in batches, cover any waiting batter with cling film pressed directly onto the surface to prevent a skin from forming.</li><li class="MethodStepper"><h4 class="step-title">Step 7</h4>Bake for 12-15 minutes until the cakes are springy to the touch and a skewer inserted comes out clean. Don't overbake – these thin layers cook quickly and overbaking will result in dry cake. Cool in the tins for 5 minutes before transferring to wire racks to cool completely.</li><li class="MethodStepper"><h4 class="step-title">Step 8</h4>For the buttercream, beat the softened butter in a large bowl until very pale and creamy (about 4-5 minutes). This extended beating time creates ultra-smooth, light frosting. Gradually add the sifted icing sugar, vanilla, and enough milk to achieve a smooth, spreadable consistency.</li><li class="MethodStepper"><h4 class="step-title">Step 9</h4>Once the cakes are completely cool, level them if necessary using a serrated knife. Place the purple layer on your serving plate or cake board. Spread a thin layer of buttercream (about 3-4 tablespoons) evenly across the surface, right to the edges.</li><li class="MethodStepper"><h4 class="step-title">Step 10</h4>Continue stacking in rainbow order – blue, green, yellow, orange, and finally red on top – with buttercream between each layer. Press down gently on each layer to secure it and remove any air pockets.</li><li class="MethodStepper"><h4 class="step-title">Step 11</h4>Apply a thin crumb coat of buttercream over the entire cake, scraping back excess frosting. This seals in any crumbs before the final frosting layer. Chill the crumb-coated cake for 30 minutes to firm up.</li><li class="MethodStepper"><h4 class="step-title">Step 12</h4>Once chilled, apply a final thick, smooth layer of buttercream to the top and sides of the cake. For the smoothest finish, use a bench scraper held at a slight angle against the cake while slowly rotating your turntable. Decorate the base or top with rainbow sprinkles if desired.</li><li class="MethodStepper"><h4 class="step-title">Step 13</h4>Allow the cake to come to room temperature for 1-2 hours before serving for the best flavor and texture. The contrast between the white exterior and vibrant rainbow interior will create a magical moment when you cut the first slice!</li></ol>

Nutrition Facts (per serving)

🍽️ Serving Size: 1 slice
🔥 Calories: 425 calories
🥑 Fat: 21 g
🧈 Saturated Fat: 13 g
🍞 Carbohydrates: 58 g
🍭 Sugar: 42 g
🍗 Protein: 4 g
🫀 Cholesterol: 105 mg
🧂 Sodium: 280 mg

Chef’s Notes

A few helpful details for making this recipe.

How do I ensure my rainbow cake layers maintain their vibrant colours during baking?

Use concentrated gel food colourings rather than liquid versions, as they provide intense colour without affecting the batter consistency. Add enough colouring to make the batter slightly darker than desired, as colours lighten during baking. Avoid overbaking, which can dull the colours.

Can I make this celebration cake in advance of a party?

Yes! You can bake the layers up to 2 days ahead and store them wrapped in cling film at room temperature. The assembled frosted cake keeps well for 3 days in a cool room. For longer storage, refrigerate the finished cake but bring to room temperature before serving for best texture.

What's the secret to perfectly even layers in a stacked cake?

For perfectly even layers, use digital scales to divide your batter equally (about 200g per layer). Bake each layer separately if possible, and once cooled, level the tops with a serrated knife. When assembling, use the same amount of buttercream between each layer and press down gently to eliminate air gaps.

Want to try something else in ...

More recipes you might like

Keep exploring with more recipes from What's Baking.