Rainbow Cake Recipe One Pan - Simple Layered Treat
In this article
A rainbow cake baked in a single pan delivers a burst of color without the hassle of multiple pans or a complicated assembly. The technique relies on dividing a basic vanilla batter, tinting each portion, and gently layering them before a single bake. The result is a moist, vibrant cake that looks as festive as it tastes, perfect for birthdays, graduations, or any celebration that calls for a little extra cheer.
Ingredients
The foundation of this cake is a classic vanilla sponge that stays tender even after being sliced into layers. All measurements are given in US customary units; metric equivalents are provided in parentheses for reference.
- 2 ½ cups (310 g) all‑purpose flour
- 2 tsp (8 g) baking powder
- ½ tsp (2.5 g) fine sea salt
- 1 cup (226 g) unsalted butter, softened
- 1 ½ cups (300 g) granulated sugar
- 4 large eggs, room temperature
- 1 tsp (5 ml) pure vanilla extract
- 1 cup (240 ml) whole milk, room temperature
- Red, orange, yellow, green, blue, and purple gel food coloring (about 1 tsp each)
- Non‑stick cooking spray or 2 tbsp (30 ml) melted butter for greasing the pan
Measure dry ingredients with a kitchen scale for consistency, and sift the flour, baking powder, and salt together to avoid lumps. When the batter is ready, divide it evenly into six small bowls—one for each color—so the color intensity stays uniform throughout the layers.
Instructions
Preparing the batter and the pan correctly sets the stage for a flawless rainbow cake. Follow each step carefully; the process only takes about 20 minutes of active work before the oven does the rest.
- Preheat the oven to 350°F (175°C). Position the rack in the middle of the oven and allow it to fully heat before loading the cake.
- Grease a 9 × 13‑inch (23 × 33 cm) rectangular baking pan with non‑stick spray or melted butter. For extra release, line the pan with parchment paper, letting the paper overhang the short sides for easy removal later.
- In a large mixing bowl, cream the softened butter and sugar together on medium speed for 3–4 minutes, until the mixture is pale, fluffy, and has increased in volume.
- Add the eggs one at a time, beating well after each addition. Scrape down the sides of the bowl to ensure even incorporation.
- Stir in the vanilla extract, then whisk together the sifted flour, baking powder, and salt. Add the dry mixture to the butter‑egg mixture in three additions, alternating with the milk, beginning and ending with the dry ingredients. Mix on low speed just until combined; over‑mixing can lead to a dense crumb.
- Divide the finished batter into six equal portions (about ⅔ cup each). Add a few drops of gel food coloring to each bowl, stirring gently until the desired hue is achieved. Use more coloring for a deeper shade, but remember that the batter will lighten slightly during baking.
- Working quickly, spoon the first (red) portion into the prepared pan, spreading it with a spatula to an even ¼‑inch thickness. Return the pan to the oven for 2 minutes—this brief “set” step helps the layer hold its shape when the next color is added.
- Remove the pan and immediately pour the second (orange) batter on top, smoothing gently. Repeat the 2‑minute bake, then continue layering the remaining colors in order: yellow, green, blue, and finally purple.
- After the last layer is added, bake the cake for a full 30–35 minutes, or until a toothpick inserted into the center comes out clean and the top is lightly golden. The internal temperature should reach 200°F (93°C) for safe consumption.
- Allow the cake to cool in the pan on a wire rack for 10 minutes, then run a thin spatula around the edges and lift it out using the parchment overhang. Transfer to a cooling rack to cool completely before frosting.
While the cake rests, you can prepare a simple buttercream or whipped cream frosting to complement the bright layers. The cake stores well wrapped at room temperature for up to two days, or in the refrigerator for up to five days.
Tips
Even seasoned bakers can encounter hiccups when working with multiple colored batters. Below are a few proven strategies to keep the process smooth and the colors vivid.
- Use gel food coloring. Gel colors contain less liquid than liquid dyes, preventing the batter from becoming runny and ensuring the layers stay distinct.
- Keep the batter cold. After dividing and coloring, place the bowls in the refrigerator for 5 minutes. Cooler batter spreads less, giving you cleaner layers.
- Don’t over‑bake the short‑set steps. The 2‑minute “pre‑bake” is just to firm the surface; exceeding this time can cause the layer to crust, making it difficult to spread the next color.
- Level each layer. Use an offset spatula or the back of a spoon to smooth each colored pour to the same thickness; uneven layers can lead to a lopsided final cake.
Finally, if a color looks too pale after mixing, add a second drop of gel dye and stir gently—avoid adding too much liquid, which can affect the cake’s texture.
Serving Suggestions
Because the cake’s interior is already a visual centerpiece, you can keep the frosting simple or go all‑out with decorative accents. A classic vanilla buttercream piped in swirls around the sides adds a creamy contrast without competing with the rainbow.
For a festive touch, sprinkle edible glitter, rainbow sprinkles, or fresh berries along the top. When serving, cut slices with a sharp, hot knife—dip the blade in hot water and wipe dry between cuts to achieve clean, crisp edges that showcase each color band.
Variations
The one‑pan method adapts easily to flavor twists. Replace a portion of the milk with coconut milk for a subtle tropical note, or swap ¼ cup of the flour for cocoa powder to create a chocolate‑colored layer that adds depth without altering the overall structure.
Another popular variation is the “confetti” version: after coloring the batter, fold in a tablespoon of mini non‑fat chocolate chips or colored sugar sprinkles into each bowl. The speckles melt slightly during baking, creating a fun surprise in every bite.
Storage and Reheating
Once the cake has cooled completely, wrap it tightly in plastic wrap or store it in an airtight container. At room temperature, the cake stays fresh for 2 days; in the refrigerator, it remains moist for up to 5 days. For longer storage, freeze the unfrosted cake wrapped in foil and a freezer bag for up to 2 months.
To reheat a slice, place it on a microwave‑safe plate and heat on medium power for 15–20 seconds, or warm a whole piece in a pre‑heated 300°F (150°C) oven for 8–10 minutes. Ensure the internal temperature reaches at least 165°F (74°C) before serving to meet safe food‑handling standards.
Frequently Asked Questions
Below are answers to the most common concerns home bakers have when attempting a one‑pan rainbow cake.
Can I use liquid food coloring instead of gel?
Liquid coloring can be used, but it adds extra moisture to the batter, which may cause the layers to blend together. If you only have liquid dye, reduce the milk by 1‑2 tbsp for each colored portion to compensate for the added liquid.
What if my cake turns out flat or the layers merge?
A flat cake usually results from under‑creaming the butter and sugar or opening the oven door too early. Make sure the butter‑sugar mixture is light and airy, and keep the oven door closed during the short pre‑bake steps and the final bake.
Is it safe to eat the batter before it’s baked?
No. Raw batter contains raw eggs and flour, which can harbor Salmonella and E. coli. Always bake the batter to an internal temperature of 200°F (93°C) before tasting.
Can I make this cake gluten‑free?
Yes. Substitute the all‑purpose flour with a 1‑to‑1 gluten‑free flour blend that contains xanthan gum. The texture may be slightly different, but the cake will still rise properly and hold its layers.
How do I prevent the colors from bleeding into each other?
Allow each layer to set for the brief 2‑minute bake before adding the next, and keep the batter cold. Using gel colors and avoiding over‑mixing also reduces the risk of bleeding.
Can I use a different pan size?
A 9 × 13‑inch pan yields a cake about 1 ½‑inch tall after layering. If you use a larger pan, the layers will be thinner and may not hold distinct colors. A smaller pan will produce a taller cake, but you may need to increase the baking time by 5‑10 minutes.