I have a soft spot for Kermit the Frog. It's not just any amphibian who would wrangle a banjo onto a lily pad, serenading any and all swamp creatures within earshot. It's not just any amphibian who would hold fast to a porcine hellion, to a swine both vain and unpredictably violent, with unwavering love and support. Miss Piggy is one lucky oinker. It's not just any amphibian who made it look so asy to be green, when we all know it isn't. And it's not just any amphibian who can sing of rainbows and dreams with an utter lack of cynicism and turn us all into believers. So for Kermit, I have designed a rainbow layer cake built for the lovers, the dreamers, and you.

Photography by Tina Rupp

MORE CAKE RECIPES FROM 'BAKE IT LIKE YOU MEAN IT'

Makes 8 servings

FOR THE CAKE:

1 pound (455 g) unsalted butter, at room temperature

4 cups (800 g) granulated sugar

10 eggs

2 teaspoons lemon extract

6 cups (750 g) all-purpose flour

2 tablespoons baking powder

2 teaspoons salt

2½ cups (600 ml) nonfat buttermilk

2 to 3 drops each of red, orange, yellow, green, blue, and purple  food colouring

FOR THE FROSTING:

4 cups (400 g) confectioners' sugar

2 (8-ounce / 225-g) packages cream cheese, at room temperature

½ cup (115 g) unsalted butter, at room temperature

1 teaspoon vanilla extract

Make the cake:

Preheat the oven to 350°F (175°C). Line two half sheet pans with parchment. Using a ruler, measure along the shorter sides of the half sheet pans and mark the parchment paper in thirds, so the pans are split 3 ways length-wise. Flip the parchment paper over so the marks are visible but do not transfer to the cakes during baking.

In the bowl of a stand mixer fitted with the whisk attachment, combine the butter and granulated sugar and whisk until light and fluffy. Slowly add the eggs, one at a time. Beat for 1 minute after

each addition to incorporate. Add  the lemon extract and stir to incorporate.

In a bowl, sift together the flour, baking powder, and salt. With the mixer running, add  pproximately one-quarter of the buttermilk to the butter mixture, then one-third of the flour mixture. Continue alternating additions of buttermilk and flour until both are incorporated. Don't overmix.

Divide the batter evenly among 6 bowls, approximately 2½ cups (600 g) of batter in each bowl. Mix and match drops of the food colourings in each bowl to come up with the following colours: red, orange, yellow, green, blue, and purple. Two drops of food colouring should be enough for  each bowl.

Transfer the red batter to a pastry bag fitted with a large open tip. Pipe the batter onto one-third of the sheet pan. (You'll use all the red batter.) Clean the tip and bag (unless you are using disposable bags), then fill the clean bag with the orange batter. Pipe the orange batter onto the middle third of the sheet pan. Clean the tip and bag again, then fill the clean bag with the yellow batter and pipe it onto the last third of the sheet pan. On the second sheet pan, repeat the process with the green, blue, and purple batter (in that order).

Bake the cakes for 25 to 30 minutes, until the tops of the cakes spring back lightly when touched. Allow the cakes to cool completely.

Make the frosting:

In the bowl of a stand mixer fitted with the whisk attachment, combine all the ingredients and whisk until smooth. Refrigerate for 1 hour to set.

To assemble:

Trim each coloured panel of cake to a strip approximately 5 inches wide by 16 inches long (12 by 40.5 cm). Trim the ends of the cakes as well. Transfer the red layer to a clean sheet pan lined with parchment paper. Apply a very thin, even layer of frosting over the red layer. Carefully place the orange layer on top of the frosted red layer and press gently to adhere. Repeat the frosting and layering process with the yellow, green, blue, and purple cake strips (in that order). Cover the assembled cake with plastic wrap and freeze for 30 minutes to stabilize it.

Using a very sharp serrated knife, trim the sides and ends of the cake. The sides need to be perfectly level, so be slow and steady. Apply a very thin coat of frosting on all sides of the cake and freeze again for 30 minutes.

Carefully transfer the cake to a serving platter, turning it over on its side so the layers are now vertical. Apply a thin layer of frosting to the newly exposed side of the cake and freeze for 10 minutes, or until the frosting has set.(You can leave the cake with the layers lying horizontally, if you prefer.)

Apply a finishing coat of frosting over the entire cake.

Preheat the oven to 225°F (107°C). Take some of the extra pieces of trimmed cake (I like to use the red), place them  on a sheet pan, and bake until the pieces have dried (but  not browned), about 10 minutes. Cool the pieces completely, then pulse in the food processor to fine crumbs.

Fold a piece of parchment paper in half and cut out varied sizes of half hearts (so they will be full hearts when you unfold them). Apply the heart stencils to the top of the cake. Pat the cake crumbs onto the exposed frosting along the sides and top of the cake. Make sure to  brush the crumbs from the tops of the stencils so that the crumbs don't later tumble into the heart shapes. Gently remove the stencils to reveal the pristine hearts.

You can simply slice the cake and serve it as is. But if you'd like to create heart-shaped slices, cut a  normal  slice and use a heart-shaped cake ring or cookie cutter  to stamp out a heart shape.

Bake It Like You Mean It, Published by Stewart Tabori & Chang, Photography by Tina Rupp, £18.99; www.amazon.co.uk