Simple Rainbow Cake: How to Make a Colorful Layered Treat
In this article
Creating a rainbow cake is a fun way to turn a simple vanilla sponge into a show‑stopping dessert that bursts with color in every bite. By dividing a single batter into separate bowls, tinting each portion, and baking the layers thinly, you end up with a stack of bright ribbons that can be filled and frosted just like a traditional layer cake. The technique is straightforward, requires only basic baking tools, and produces consistent results when you follow the temperature, mixing, and cooling guidelines carefully.
What You’ll Need
- All‑purpose flour – 2 ½ cups (312 g)
- Sugar – 1 ½ cups (300 g)
- Baking powder – 2 tsp
- Salt – ½ tsp
- Unsalted butter, softened – ½ cup (115 g)
- Large eggs – 4 (room temperature)
- Whole milk – 1 cup (240 ml)
- Pure vanilla extract – 2 tsp
- Food‑grade gel or powder food coloring – red, orange, yellow, green, blue, purple
- 9‑inch square or round cake pans – 6 (or reuse three pans, cooling between batches)
- Silicone baking mat or parchment paper
- Electric mixer (hand or stand)
- Spatula, whisk, and measuring cups/spoons
- Cooling rack
- Instant‑read thermometer (optional but recommended)
Step‑by‑Step
- Prepare the oven and pans. Preheat the oven to 350°F (177°C). Grease each pan lightly with butter or spray, then line the bottoms with parchment. This prevents sticking and makes it easier to lift the thin layers after baking.
- Combine dry ingredients. In a large bowl whisk together flour, baking powder, and salt. Set aside. Properly aerated dry ingredients give the cake a tender crumb and help the layers rise evenly.
- Cream butter and sugar. Using a mixer on medium speed, beat the softened butter with the sugar for 3–4 minutes until the mixture is pale, fluffy, and has increased in volume. This step incorporates air, which is critical for a light texture.
- Add eggs and vanilla. Add the eggs one at a time, beating after each addition until fully incorporated. Scrape the sides of the bowl to ensure no egg streaks remain. Stir in vanilla extract.
- Incorporate wet and dry components. With the mixer on low, add the flour mixture in three additions, alternating with the milk, beginning and ending with flour. Mix just until no streaks remain; over‑mixing can develop gluten and make the cake tough.
- Divide the batter. Transfer the finished batter to a large measuring cup or a sturdy bowl. You should have enough for six equal portions. Using a kitchen scale (≈150 g per portion) ensures each layer is the same thickness, which is essential for an even rainbow.
- Color each portion. Add a small amount of food coloring to each bowl – start with a few drops of gel or a pinch of powder, then stir thoroughly. Adjust until the desired hue is reached; remember that the batter will look slightly lighter after baking. Typical color order from bottom to top is red, orange, yellow, green, blue, purple.
- Portion into pans. Spoon one colored batter into a prepared pan, spreading it with a spatula to the edges. The batter should be about ¼‑inch thick; if it looks too thick, spread it thinner – thin layers bake faster and stay moist.
- Bake each layer. Place the pan in the middle rack and bake for 8–10 minutes, or until a toothpick inserted into the center comes out clean and the top feels set. Internal temperature should reach at least 190°F (88°C). Rotate the pan halfway through for even browning.
- Cool and release. Allow the layer to cool in the pan for 2 minutes, then run a thin offset spatula around the edges and invert onto a cooling rack. Peel off the parchment. If the cake sticks, a quick flash of a hot, damp towel on the bottom of the pan can release it.
- Repeat for remaining colors. While the first layer cools, prepare the next colored batter and repeat steps 8‑10. Using the same pan reduces cleanup; just let the pan return to room temperature between batches to avoid warping.
- Trim and level. Once all six layers are completely cool, use a long serrated knife or cake leveler to trim any uneven tops. This creates flat surfaces for stacking and ensures the final cake stands straight.
- Assemble the cake. Place the purple layer on a serving plate, spread a thin coat of buttercream or whipped cream (minimum 165°F/74°C if made with fresh eggs) as a “crumb coat.” Continue stacking layers in reverse order of color – blue, green, yellow, orange, red – applying a thin frosting between each. Press gently to eliminate air pockets.
- Apply final frosting. Once the stack is complete, coat the entire cake with a smooth layer of your chosen frosting. A bench scraper attached to a turntable helps achieve a clean finish. Chill the cake for 20 minutes to set the crumb coat before adding decorative swirls or sprinkles.
- Serve and store. Slice with a hot, wet knife for clean cuts. Store leftovers in an airtight container in the refrigerator for up to 4 days. Bring to room temperature before serving for optimal flavor.
Common Mistakes
- Using too much flour when measuring – spoon and level rather than scooping to avoid a dense crumb.
- Over‑mixing the batter – this develops gluten and makes layers rubbery.
- Skipping the cooling step – hot layers can melt frosting and cause sliding.
- Applying insufficient color – a faint hue looks washed out; add a bit more gel or powder after the first mix.
- Under‑baking – thin layers dry out quickly, but under‑baked centers remain gummy and unsafe (raw egg risk).
Tips
- Use gel food coloring instead of liquid; gel provides vivid color without adding extra liquid that could thin the batter.
- Keep batter temperature consistent – if a bowl feels warm after mixing, chill it briefly before dividing.
- Line pans with silicone mats; they conduct heat evenly and reduce the need for greasing.
- For a smoother crumb coat, chill the assembled cake before applying the final frosting layer.
- Store colored batter in the refrigerator for up to 30 minutes if you need to stagger the coloring process.
Troubleshooting
Layers are uneven in thickness. Use a kitchen scale to weigh each portion before pouring, and spread with a ruler‑edge spatula to achieve uniform height.
Batter spreads too thin and cracks. Reduce oven temperature by 10–15°F and add a tablespoon of extra milk to increase batter viscosity.
Colors bleed into each other. Allow each baked layer to cool completely and set on a rack before stacking. A light dusting of powdered sugar between layers can act as a barrier.
Frosting slides off the cake. Ensure the crumb coat is firm; chill the cake 15‑20 minutes before applying the final layer. If the frosting is too soft, refrigerate it briefly to thicken.
Raw‑egg safety concern. Use pasteurized eggs or a heat‑treated egg mixture (heat egg‑milk blend to 140°F/60°C for 3 minutes, then cool) to eliminate salmonella risk.
Frequently Asked Questions
Can I use a boxed cake mix?
Yes, a plain vanilla mix works, but you must add extra leavening (1 tsp baking powder) and adjust sugar to match the recipe’s ratios.
Do I need a separate pan for each color?
No. One well‑greased pan can be reused; just let it return to room temperature between batches to prevent warping.
What if I don’t have gel coloring?
Powdered food coloring works equally well; start with a pinch and blend thoroughly to avoid streaks.
How long can I keep the cake before frosting?
Unfrosted layers stay fresh, wrapped in plastic, for up to 2 days at room temperature or 5 days refrigerated.
Is it safe to eat the batter while I’m mixing?
No. Raw flour and eggs can harbor bacteria. Use pasteurized eggs or heat‑treat the flour if you want to sample the batter.
Can I make a gluten‑free rainbow cake?
Replace all‑purpose flour with a 1‑to‑1 gluten‑free blend that contains xanthan gum; the rest of the method stays the same.