Prepare for Baking:
- Preheat your oven to 350°F (175°C). Grease six 8-inch or 9-inch round cake pans generously with butter or baking spray, then line the bottoms with parchment paper circles. Grease the parchment too. This double preparation ensures your colorful layers come out perfectly intact.
- In a medium bowl, whisk together the flour, baking powder, baking soda, and salt. Set aside. This ensures your leavening agents are evenly distributed throughout the flour.
Make the Cake Batter:
- In a large mixing bowl or stand mixer fitted with the paddle attachment, beat the room temperature butter on medium speed for about 2 minutes until smooth and creamy. Gradually add the sugar and continue beating for 3-4 minutes until the mixture is light, fluffy, and pale in color. This creaming process is crucial for creating a tender cake texture.
- Add the eggs one at a time, beating well after each addition (about 30 seconds per egg). Scrape down the sides of the bowl between additions. Mix in the vanilla extract.
- With the mixer on low speed, add the flour mixture in three additions, alternating with the milk in two additions (beginning and ending with flour). Mix just until combined after each addition – do not overmix! The batter should be smooth and thick but pourable. Scrape down the sides and bottom of the bowl to ensure everything is incorporated.
Color the Batter:
- Divide the batter evenly among six small bowls (about 1 cup of batter per bowl). Use a kitchen scale for precision if you have one, or eyeball it – slight variations are fine.
- Add gel food coloring to each bowl: red to one, orange to another, yellow, green, blue, and purple to the remaining bowls. Start with 3-4 drops (gel is concentrated!), then mix thoroughly. Add more coloring gradually until you achieve vibrant, saturated colors. The colors should be bright before baking – they’ll stay true as they bake.
Bake the Layers:
- Pour each colored batter into its own prepared pan, spreading evenly with a spatula. Gently tap the pans on the counter a few times to release any air bubbles.
- Bake for 22-27 minutes, or until a toothpick inserted in the center comes out clean or with just a few moist crumbs. The tops should spring back when lightly pressed. Baking time may vary based on your oven and pan size – 8-inch pans may need closer to 27 minutes, while 9-inch pans bake faster.
- Remove from the oven and let cool in the pans for 10 minutes. Then run a knife around the edges and carefully invert onto cooling racks. Peel off the parchment paper. Allow the layers to cool COMPLETELY before frosting (at least 1-2 hours, or speed up the process by refrigerating for 30-45 minutes).
Make the Buttercream Frosting:
- In a large mixing bowl or stand mixer fitted with the paddle attachment, beat the room temperature butter on medium speed for 3-4 minutes until very smooth, creamy, and pale in color.
- Reduce speed to low and gradually add the sifted powdered sugar, one cup at a time, beating well after each addition. The mixture will look dry and crumbly at first – this is normal.
- Add the vanilla extract, salt, and 2 tablespoons of heavy cream. Increase speed to medium-high and beat for 3-5 minutes until the frosting is light, fluffy, and smooth. If the frosting is too thick, add more cream one tablespoon at a time. If it’s too thin, add more powdered sugar ¼ cup at a time.
Assemble the Rainbow Cake:
- Place your first layer (traditionally purple, but you can start with any color) on a cake board or serving plate. If your layers domed on top, use a serrated knife to level them for easier stacking.
- Spread about ½ cup of frosting evenly over the first layer, going right to the edges. Place the next color layer on top (blue), and repeat with frosting. Continue stacking in rainbow order: purple, blue, green, yellow, orange, red (or reverse the order – it’s your cake!).
- Once all layers are stacked, apply a thin “crumb coat” of frosting all over the entire cake (top and sides). This seals in any crumbs. Don’t worry about it looking perfect – you’ll barely see the cake through this layer. Refrigerate for 30 minutes to let the crumb coat set.
- Apply the final coat of frosting, using more generous amounts and smoothing with an offset spatula. Work from the top down, and use a bench scraper or offset spatula to smooth the sides while rotating the cake (a turntable makes this much easier). You can create a smooth finish, or leave it textured and rustic.
- Refrigerate the finished cake for at least 1 hour before slicing to let the frosting firm up. When ready to serve, use a sharp knife wiped clean between each slice to reveal those gorgeous rainbow layers!