Zimt

Rainbow Cake Recipe: A Stunning Showstopper

· 5 min read · Cakes

In this article
  1. Ingredients
  2. Instructions
  3. Tips
  4. Serving Suggestions
  5. Variations
  6. Storage and Reheating
  7. Frequently Asked Questions

This rainbow cake is a vibrant, layered vanilla cake with six brightly colored tiers, frosted in a silky buttercream. It’s a guaranteed showstopper for birthdays, pride celebrations, or any party where you want a wow factor. The recipe uses a single batter divided and colored, so it’s easier than it looks—just take your time with the layers and chilling steps.

Ingredients

  • 3 cups (360g) all-purpose flour
  • 1 tablespoon baking powder
  • 1/2 teaspoon salt
  • 1 cup (226g) unsalted butter, softened
  • 2 cups (400g) granulated sugar
  • 4 large eggs, at room temperature
  • 1 cup (240ml) whole milk, at room temperature
  • 2 teaspoons vanilla extract
  • Gel food coloring: red, orange, yellow, green, blue, purple
  • For the buttercream:
    • 1 1/2 cups (340g) unsalted butter, softened
    • 4 cups (480g) powdered sugar, sifted
    • 2 teaspoons vanilla extract
    • 2–3 tablespoons heavy cream or milk
    • A pinch of salt

Instructions

  1. Preheat your oven to 350°F (175°C). Grease and flour three 8-inch round cake pans, then line the bottoms with parchment paper.
  2. In a medium bowl, whisk together the flour, baking powder, and salt. Set aside.
  3. In a large bowl, beat the butter and sugar together with an electric mixer on medium speed until light and fluffy, about 3–4 minutes. Scrape down the sides as needed.
  4. Add the eggs one at a time, beating well after each addition. Beat in the vanilla extract.
  5. With the mixer on low speed, add the flour mixture in three additions, alternating with the milk in two additions, starting and ending with the flour. Mix just until combined—do not overmix.
  6. Divide the batter evenly into six bowls (about 1 cup each). Add gel food coloring to each bowl to create red, orange, yellow, green, blue, and purple batters. Stir each until the color is uniform.
  7. Pour each colored batter into a separate prepared pan. If you only have three pans, bake in batches: bake three layers at a time, then wash and reuse the pans for the remaining three.
  8. Bake for 18–22 minutes, or until a toothpick inserted into the center comes out clean. Let the cakes cool in the pans for 10 minutes, then turn out onto a wire rack to cool completely. Once cool, you can level the tops with a serrated knife if needed.
  9. Make the buttercream: In a large bowl, beat the butter until smooth. Gradually add the powdered sugar, beating on low speed until incorporated. Add the vanilla, salt, and 2 tablespoons of cream. Beat on medium-high for 3–4 minutes until light and fluffy. Add more cream if needed for a spreadable consistency.
  10. To assemble: Place one cake layer on a serving plate. Spread a thin layer of buttercream on top. Repeat with the remaining layers, stacking them in rainbow order (red, orange, yellow, green, blue, purple).
  11. Frost the top and sides with the remaining buttercream. Use an offset spatula for a smooth finish, or create swirls for a rustic look.
  12. Chill the assembled cake for at least 30 minutes before slicing to help the layers set. Slice with a sharp knife, wiping it clean between cuts for neat pieces.

Tips

  • Use gel food coloring—liquid drops are too watery and will thin the batter. Gel colors give vivid shades without changing the consistency.
  • Weigh your batter for even layers. Use a kitchen scale to divide the batter equally among the six bowls; this ensures each layer is the same thickness.
  • Don’t overmix the batter once you add the flour—overmixing develops gluten and makes the cake tough. Mix just until no streaks remain.
  • Chill the cake before frosting if it’s too crumbly. A 15-minute freeze makes the layers firmer and easier to handle.

Serving Suggestions

Serve this cake at birthday parties, baby showers, or any festive gathering. It pairs beautifully with a glass of cold milk, coffee, or a fruity punch. For a dramatic presentation, place it on a white cake stand and garnish with rainbow sprinkles or fresh berries on top.

Variations

  • Pastel rainbow: Use just a tiny amount of each gel color for soft, muted pastel layers.
  • Lemon or almond flavor: Replace the vanilla extract with 1 teaspoon of lemon extract or 1/2 teaspoon of almond extract for a different flavor profile.
  • Chocolate rainbow: Replace 1/2 cup of flour with 1/2 cup of unsweetened cocoa powder for a chocolate version—still colorful, but with a deeper base flavor.
  • Cupcakes: Divide the colored batters into cupcake liners (about 2 tablespoons each) and bake for 15–18 minutes. Frost with buttercream and top with sprinkles.

Storage and Reheating

Store the unfrosted cake layers (wrapped tightly in plastic wrap) at room temperature for up to 2 days, or freeze for up to 3 months. The assembled, frosted cake can be kept in the refrigerator for up to 4 days—bring it to room temperature for 30 minutes before serving for the best flavor and texture. To freeze the frosted cake, place it in the freezer for 1 hour to firm up, then wrap in plastic wrap and foil; freeze for up to 3 months. Thaw overnight in the refrigerator before serving. Do not reheat the cake; it is meant to be served at room temperature.

Frequently Asked Questions

Can I use a boxed cake mix?

Yes, you can. Prepare a white or vanilla boxed cake mix according to package directions, then divide and color the batter as instructed. The baking time may vary slightly, so check for doneness with a toothpick.

How do I get perfectly flat layers?

Use cake strips around the pans (or wet paper towels) to promote even baking. Also, level the cooled cakes with a serrated knife or a cake leveler to remove any domed tops.

Why did my colors turn out muddy?

This usually happens if you overmix the food coloring into the batter, which can cause the colors to dull. Stir just until the color is even. Also, use gel colors rather than liquid, as liquid can make the batter too thin and cause colors to bleed.

Can I make this cake in advance?

Yes. Bake the layers up to 2 days ahead and store them wrapped in plastic wrap at room temperature. You can also assemble and frost the cake a day ahead; keep it refrigerated and bring to room temperature before serving.

How many people does this cake serve?

This 8-inch three-layer cake (with six thin layers) serves about 12–16 people, depending on slice size. For a larger crowd, double the recipe and use 9-inch pans.

Do I need to refrigerate the cake?

If you’re serving it within a few hours, room temperature is fine. For longer storage, refrigerate it to keep the buttercream fresh. Always let it sit out for 20–30 minutes before serving to soften the frosting.