Skip to main content

The Perfect Cake

Recipe to Make Now:

Rainbow Cake

Why This Recipe Works

If it's possible that just looking at a cake can make you happy, this is the cake to do it. The array of vibrant colors will liven the mood at any celebration and is sure to appeal to guests of all ages. We started with our classic white layer cake recipe as the base. It's rich and tender and has the structure to stand tall in six layers; plus, it was the obvious choice for easy dyeing. We separated the batter into six portions and stirred in food dye right before baking. Baking our colorful layers in two batches of three cakes each ensured they were evenly cooked.

Serves 20 to 24

We had the best luck using Betty Crocker Food Gel Colors. The amount of food dye required and the resulting color will differ from brand to brand. We strongly recommend using food gel coloring over liquid food dye for best results. Be sure to let the cake pans cool completely before repeating with more batter. Align layers evenly to ensure this tall cake stands straight. To make 10 cups of frosting, prepare the 5-cup recipe for Vanilla Frosting (see below) twice. (Do not try doubling the recipe; it won't fit in the mixer.) You may have leftover frosting after decorating.

2 cups whole milk, room temperature
12 large egg whites, room temperature
2 teaspoons vanilla extract
4½ cups (18 ounces) cake flour
3½ cups (24½ ounces) sugar
2 tablespoons plus 2 teaspoon baking powder
2 teaspoons salt
24 tablespoons (3 sticks) unsalted butter, cut into 24 pieces and softened
Gel food dye (red, orange, yellow, green, blue, and purple)
10 cups Vanilla Frosting (recipe follows)

1. Adjust oven racks to upper-middle and lower-middle positions and heat oven to 350 degrees. Grease three 9-inch round cake pans, line with parchment paper, grease parchment, and flour pans.

2. Whisk 1 cup milk, 6 egg whites, and 1 teaspoon vanilla together in 2-cup liquid measuring cup. Using stand mixer fitted with paddle, mix 2¼ cups (9 ounces) flour, 1¾ cups (12¼ ounces) sugar, 4 teaspoons baking powder, and 1 teaspoon salt on low speed until combined. Add 12 tablespoons butter, 1 piece at a time, and mix until only pea-size pieces remain, about 1 minute. Add half of milk mixture, increase speed to medium-high, and beat until light and fluffy, about 1 minute. Reduce speed to medium-low, add remaining milk mixture, and beat until incorporated, about 30 seconds (batter may look slightly curdled). Give batter final stir by hand.

3. Divide batter evenly among three bowls. Add ½ teaspoon red gel food dye to one bowl, ¼ teaspoon yellow to second bowl, and ¼ teaspoon orange to third bowl. Stir each to combine. Transfer each colored batter to separate prepared pans. Smooth tops with rubber spatula and gently tap pans on counter to release air bubbles. Place 2 pans on upper rack and one pan on lower rack. Bake until toothpick inserted in center comes out clean, 18 to 22 minutes, switching and rotating pans halfway through baking. Let cakes cool in pans on wire rack for 10 minutes. Remove cakes from pans, discarding parchment, and let cool completely on rack, about 2 hours.

4. Repeat steps 1 through 3 with remaining ingredients, using ½ teaspoon blue, ½ teaspoon green, and ½ teaspoon purple gel food dye in each bowl of batter. (Cakes can be stored at room temperature for up to 24 hours or frozen for up to 1 month; defrost cakes at room temperature.)

5. Line edges of cake platter with 4 strips of parchment to keep platter clean and place small dab of frosting in center of platter to anchor cake. Place purple cake layer on platter. Spread ¾ cup frosting evenly over top, right to edge of cake. Top with blue cake layer, pressing lightly to adhere, and repeat process with green, yellow, orange, and red layers, pressing lightly to adhere and spreading 2/4 cup frosting evenly over each layer. Place ¾ cup frosting in center of top of cake and spread to outer edges, letting any excess hang over edges; smooth top. Spread half of remaining frosting along sides of cake with short side-by-side strokes until entire side is covered with thin coat of frosting. Refrigerate cake until frosting is set, about 15 minutes.

6. Spread remaining frosting evenly over top and sides of cake. Carefully remove parchment strips before serving.


Vanilla Frosting

Makes 5 cups, enough for two-layer cake

To make 10 cups of frosting, prepare this recipe twice. (Do not try doubling the recipe; it won't fit in the mixer.) You may have leftover frosting after decorating.

1 pound (4 sticks) unsalted butter, each stick cut into quarters and softened
¼ cup heavy cream
1 tablespoon vanilla extract
¼ teaspoon salt
4 cups (16 ounces) confectioners' sugar

1. Using stand mixer fitted with paddle, beat butter, cream, vanilla, and salt on medium-high speed until smooth, about 1 minute. Reduce speed to medium-low, slowly add sugar, and beat until incorporated and smooth, about 4 minutes.

2. Increase speed to medium-high and beat until frosting is light and fluffy, about 5 minutes. (Frosting can be refrigerated for up to 3 days; let soften at room temperature, about 2 hours, then rewhip on medium speed until smooth, 2 to 5 minutes.)

Buy the Book

The Definitive Guide to Cakes for Every Occasion The Perfect Cake

Gathering together years of baking knowledge in our first-ever cake book, this comprehensive collection features recipes for any cake you can imagine—from better-than-the-rest yellow cake layers for birthday parties to fanciful creations and elegant holiday desserts.