This gluten-free rainbow cake delivers the same tall, tender crumb and bright layers as the classic version, using a blend of rice flour and almond flour so the cake stays moist without gluten. Each layer is dyed a different color, stacked with a light vanilla buttercream, and sliced to reveal the full spectrum.
Ingredients
- 2 cups (280 g) gluten-free all-purpose flour (see note)
- 1 cup (100 g) almond flour
- 2 tsp baking powder
- 1/2 tsp baking soda
- 1/2 tsp salt
- 1 cup (226 g) unsalted butter, softened
- 1 1/2 cups (300 g) granulated sugar
- 4 large eggs, room temperature
- 1 tbsp vanilla extract
- 1 cup (240 ml) buttermilk, room temperature
- Gel food coloring: red, orange, yellow, green, blue, purple
For the Vanilla Buttercream
- 1 1/2 cups (340 g) unsalted butter, softened
- 4 cups (480 g) powdered sugar
- 2 tsp vanilla extract
- 2–3 tbsp (30–45 ml) milk or cream
- Pinch of salt
Pick the Pan Before You Mix the Batter
This recipe uses three 8-inch (20 cm) round pans. If you only have two, bake in two batches: divide the batter into two bowls, color and bake, then repeat with the remaining batter. For a single 9×13-inch (23×33 cm) sheet, bake for 30–35 minutes and cut into rectangles instead of layers.
Mix the Dry and Wet Mixtures
Preheat the oven to 350°F (175°C). Grease three 8-inch (20 cm) round pans and line the bottoms with parchment paper.
In a medium bowl, whisk together the gluten-free flour, almond flour, baking powder, baking soda, and salt. In a large bowl, beat the butter and sugar on medium speed until light and fluffy, about 3 minutes. Add the eggs one at a time, beating well after each, then beat in the vanilla. Reduce speed to low and add the flour mixture in three additions, alternating with the buttermilk, starting and ending with flour. Mix just until combined—overmixing makes the cake dense.
Color and Bake the Layers
Divide the batter evenly among six small bowls (about 1 cup / 240 ml each). Tint each bowl with gel food coloring: red, orange, yellow, green, blue, and purple. Use a toothpick to add color gradually; gel is concentrated, so start with a small dab.
Pour each colored batter into its own prepared pan. If you have only three pans, bake three at a time: keep the other three bowls at room temperature for up to 30 minutes, then bake them after the first batch comes out.
Bake at 350°F (175°C) for 20–25 minutes, until a toothpick inserted in the center comes out clean and the edges pull away from the pan. Cool in the pans on a wire rack for 10 minutes, then turn out onto the rack to cool completely, about 1 hour.
Make the Buttercream and Assemble
For the buttercream, beat the butter on medium speed until smooth, about 2 minutes. Add the powdered sugar one cup at a time, beating on low, then add the vanilla, salt, and 2 tablespoons of milk. Beat on medium-high for 3–4 minutes until fluffy, adding more milk if needed for spreadable consistency.
Place the red layer on a cake plate and spread a thin layer of buttercream on top. Repeat with orange, yellow, green, blue, and purple, stacking in that order. Frost the top and sides with the remaining buttercream. Chill for 30 minutes before slicing so the layers hold together.
Swap Ingredients Without Changing the Crumb
If you don’t have almond flour, replace it with an equal amount of gluten-free all-purpose flour—the cake will be slightly less tender. For a dairy-free version, use plant-based butter and plain unsweetened oat milk mixed with 1 teaspoon lemon juice instead of buttermilk. Check that your gluten-free flour blend contains xanthan gum; if not, add 1/2 teaspoon to the dry mix.
Store the Cake and Keep It Fresh
Assembled cake keeps in the refrigerator for up to 4 days, covered with a cake dome or in an airtight container. Let it sit at room temperature for 20 minutes before serving. Unfrosted layers can be wrapped tightly in plastic and frozen for up to 2 months; thaw overnight in the fridge before frosting.
Can I Use Liquid Food Coloring?
Yes, but liquid coloring is less concentrated, so you’ll need more drops to reach vivid colors, and the extra liquid can thin the batter slightly. Add a tablespoon of gluten-free flour to compensate if the batter looks runny.
Why Did My Cake Sink in the Middle?
The oven door may have been opened too early, or the baking powder was old. Test the baking powder by stirring 1/2 teaspoon into 1/4 cup hot water—if it bubbles vigorously, it’s still active.
Related
- Butter Cookie Rainbow Cake Manhasset Style
- Gluten-Free Banana Bread Recipe UK
- How to Make Gluten Free Cake Pops
Safe minimum internal temperatures follow USDA FSIS; raw-fish guidance follows the U.S. FDA. See our food safety notes.
Spotted an error? Tell us and we will correct it (corrections policy).