A galaxy cake is a show-stopping layer cake with a deep blue, purple, and pink swirl interior and a glossy, star-speckled finish. It looks like a miniature universe on a plate, but the technique is surprisingly simple: you marble colored batters, stack them with a matching buttercream, and finish with a dark frosting that you paint with edible stars. This recipe delivers a moist, tender vanilla crumb that holds its color well, and it uses a straightforward American buttercream that pipes and spreads cleanly. Whether it’s for a birthday, a space-themed party, or just because you want to impress, this cake is a reliable crowd-pleaser.
Ingredients
- For the cake:
- 2 ½ cups (315 g) all-purpose flour
- 2 ½ teaspoons baking powder
- ½ teaspoon salt
- ¾ cup (170 g) unsalted butter, softened
- 1 ¾ cups (350 g) granulated sugar
- 3 large eggs, at room temperature
- 1 tablespoon vanilla extract
- 1 cup (240 ml) whole milk, at room temperature
- Gel food coloring: violet, royal blue, and pink (or magenta)
- Black gel food coloring (for the crumb and frosting)
- For the vanilla buttercream:
- 1 cup (226 g) unsalted butter, softened
- 4 cups (480 g) powdered sugar, sifted
- 3 tablespoons heavy cream (or milk)
- 1 teaspoon vanilla extract
- Pinch of salt
- For the galaxy finish:
- Black gel food coloring (to darken the buttercream)
- Edible glitter or luster dust (silver, gold, or iridescent)
- Edible star sprinkles or star-shaped confetti
Instructions
- Preheat and prep: Preheat your oven to 350°F (175°C). Grease three 8-inch round cake pans, line the bottoms with parchment paper, and lightly flour the sides.
- Make the dry mix: In a medium bowl, whisk together the flour, baking powder, and salt. Set aside.
- Cream butter and sugar: In a large bowl, beat the softened butter and sugar with an electric mixer on medium speed until light and fluffy, about 3–4 minutes. Scrape down the sides as needed.
- Add eggs and vanilla: Beat in the eggs one at a time, then add the vanilla. Mix until fully combined.
- Alternate dry and milk: With the mixer on low, add the dry ingredients in three additions, alternating with the milk, starting and ending with the dry. Mix just until no streaks of flour remain. Do not overmix.
- Divide and color: Divide the batter evenly into three bowls. Color one bowl with violet, one with royal blue, and one with pink. Stir each until the color is uniform. If you want a deeper space look, add a tiny dab of black to each color to mute them slightly.
- Marble the batters: Drop spoonfuls of each colored batter into the prepared pans, alternating colors. Use a knife or skewer to gently swirl the batters together—do not overmix; you want distinct streaks.
- Bake: Bake for 25–30 minutes, or until a toothpick inserted into the center comes out clean. Let cool in the pans for 10 minutes, then turn out onto a wire rack to cool completely.
- Make the buttercream: Beat the softened butter until smooth. Gradually add the powdered sugar, one cup at a time, beating on low. Add the cream, vanilla, and salt. Beat on medium-high for 2–3 minutes until light and fluffy. If the frosting is too stiff, add a little more cream; if too loose, add more powdered sugar.
- Darken the frosting: Set aside about 1 cup of white buttercream for the interior (if you want a light contrast). To the remaining buttercream, add black gel food coloring until it reaches a dark charcoal or black color. You may need a fair amount—gel is more concentrated than liquid.
- Assemble the layers: Place one cake layer on a serving plate. Spread a thin layer of the white buttercream (or any leftover colored frosting) on top. Repeat with the second layer, then place the third layer on top. Apply a thin crumb coat of the dark buttercream over the entire cake. Chill for 30 minutes.
- Final frosting: After the crumb coat is firm, apply a smooth, even layer of the dark buttercream. Use a bench scraper for clean sides.
- Decorate: While the frosting is still soft, brush or dust edible glitter over the top and sides. Press star sprinkles onto the sides or scatter them on top. For a more dramatic effect, you can also paint on a few streaks of luster dust with a dry brush.
- Chill and serve: Refrigerate the cake for at least 30 minutes before slicing to set the frosting. Serve at room temperature for best flavor.
Tips
- Use gel food coloring: Liquid colors won’t give the same vivid, deep shades and can thin the batter. Gel colors are concentrated and won’t alter the texture.
- Don’t overmix the marbling: A few swipes are enough. Overmixing will turn the batters into a muddy brown-purple instead of distinct galaxy swirls.
- Chill the cake before slicing: A cold cake cuts cleaner. Use a long, sharp knife and wipe it between cuts for neat slices.
- If the black frosting tastes bitter: Some black gel colors have a slightly metallic taste. Use a high-quality brand, or add a pinch of salt and an extra teaspoon of vanilla to balance it.
Serving Suggestions
Serve this cake as the centerpiece at a birthday party, a baby shower, or a space-themed event. It pairs beautifully with a scoop of vanilla ice cream or a dollop of whipped cream. For a dramatic reveal, slice it at the table so guests see the colorful interior. It also works well as a dessert for a movie night featuring sci-fi classics.
Variations
- Chocolate galaxy: Replace ½ cup of flour with ½ cup of unsweetened cocoa powder for a chocolate base, and use orange and yellow food coloring to mimic a nebula.
- Cupcakes: Divide the marbled batter into cupcake liners and bake for 18–22 minutes. Frost with the same dark buttercream and star sprinkles.
- Vegan version: Use plant-based butter, flax eggs (1 tablespoon ground flaxseed + 3 tablespoons water per egg), and almond or oat milk. The texture will be slightly denser but still delicious.
- Gluten-free: Substitute a 1:1 gluten-free flour blend that contains xanthan gum. Bake time may vary slightly; check with a toothpick.
Storage and Reheating
Store the frosted cake in an airtight container in the refrigerator for up to 5 days. Let it sit at room temperature for 30–60 minutes before serving to soften the buttercream. You can also freeze the unfrosted cake layers (wrapped tightly in plastic wrap and foil) for up to 3 months; thaw overnight in the fridge before assembling. The frosted cake itself can be frozen for up to 2 months, but the decorations may lose some sparkle. To reheat individual slices, microwave for 10–15 seconds—just enough to take the chill off, not to melt the frosting.
Frequently Asked Questions
Can I make this cake without a stand mixer?
Yes, a hand mixer works fine. For the batter, you can also mix by hand with a whisk, but be sure to cream the butter and sugar thoroughly—about 5 minutes of vigorous whisking.
Why did my cake layers come out lopsided?
Uneven layers usually happen if the batter is overmixed or if the oven temperature is inconsistent. Use an oven thermometer and make sure your pans are centered on the middle rack. You can also level the cooled cakes with a serrated knife.
Can I use liquid food coloring instead of gel?
You can, but you’ll need to use more, which may thin the batter and dull the colors. Gel is strongly recommended for the deep, vibrant shades that make a galaxy cake stand out.
How do I get the black frosting to be truly black?
Start with a dark chocolate buttercream (add ¼ cup cocoa powder) or use a high-quality black gel color. Add the color gradually, then let the frosting sit for 30 minutes—the color deepens over time. You can also add a tiny bit of violet or blue to counteract any grayness.
Can I make this cake a day ahead?
Absolutely. Assemble and frost the cake, then refrigerate uncovered for 1 hour to set the frosting. Once firm, cover loosely with plastic wrap and store in the fridge. Remove from the fridge 1–2 hours before serving.
What if I don’t have three 8-inch pans?
You can use two 9-inch pans and adjust the baking time (start checking at 20 minutes). Or bake the batter in two batches if you only have one pan—just keep the batter covered at room temperature and bake the second batch after the first cools.