This rainbow buttercream frosting is a show-stopping, swirl-worthy frosting that turns any cake or cupcake into a festive centerpiece. It’s a classic American buttercream—sweet, fluffy, and stable—divided and tinted into vibrant colors, then piped or spread for a gorgeous tie-dye or layered effect. The recipe works because it uses a simple ratio of butter to powdered sugar that pipes cleanly, holds its shape, and tastes like vanilla heaven.
Ingredients
- 1 cup (2 sticks / 226g) unsalted butter, softened to room temperature
- 4 cups (480g) powdered sugar, sifted
- 2–3 tablespoons heavy cream or whole milk (plus more if needed)
- 2 teaspoons vanilla extract
- ¼ teaspoon salt (optional, to balance sweetness)
- Gel food coloring in red, orange, yellow, green, blue, and purple (or your preferred colors)
Instructions
- In a large mixing bowl, beat the softened butter on medium speed until smooth and creamy, about 2 minutes. Scrape down the sides and bottom of the bowl.
- Add the sifted powdered sugar, 1 cup at a time, mixing on low speed after each addition until incorporated. This prevents a sugar cloud.
- Add 2 tablespoons of heavy cream, vanilla extract, and salt (if using). Beat on medium-high speed for 3–5 minutes until the frosting is light, fluffy, and spreadable. If it’s too thick, add the remaining tablespoon of cream; if too thin, add a little more powdered sugar.
- Divide the frosting evenly into 6 small bowls (about ¾ cup each). Use a toothpick to add a small amount of gel food coloring to each bowl—one color per bowl. Stir each until the color is uniform. Add more coloring a little at a time to achieve desired intensity.
- To create a rainbow swirl effect: Lay a large piece of plastic wrap on the counter. Spoon the colored frostings in a line, side by side, in the order of the rainbow (red, orange, yellow, green, blue, purple). Roll the plastic wrap into a log, twisting the ends to seal. Snip off one corner of the log.
- Fit a piping bag with a large star or round tip. Insert the plastic wrap log into the bag, with the snipped corner pointing down into the tip. The colors will come out together as you pipe.
- Pipe swirls onto cupcakes or a cake, or use an offset spatula to spread the frosting for a marbled effect. For a simpler look, you can also spoon the colors into the bag in alternating layers.
Tips
- Use gel food coloring: Liquid food coloring can thin the frosting and make colors muddy. Gel colors are concentrated, so you use less and get vibrant, true hues.
- Soften butter properly: Butter should be at room temperature (about 65°F) but not melted. If it’s too soft, the frosting will be runny; if too cold, it will be lumpy.
- Sift the powdered sugar: Sifting removes lumps and ensures a silky-smooth texture. If you skip this, you’ll have tiny white specks in the frosting.
- Adjust consistency: For piping, the frosting should hold a stiff peak. For spreading, it can be slightly softer. Add cream a teaspoon at a time to reach the right consistency.
Serving Suggestions
This rainbow buttercream is perfect for birthday cakes, celebration cupcakes, or any dessert that needs a pop of color. Use it to frost a classic vanilla or chocolate cake, pipe onto sugar cookies, or spread between layers of a rainbow cake. It also pairs beautifully with funfetti cupcakes or a simple sponge cake. Decorate with sprinkles, edible glitter, or fresh berries for extra flair.
Variations
- Chocolate rainbow: Replace ¼ cup of powdered sugar with ¼ cup of unsweetened cocoa powder for a chocolate base.
- Citrus twist: Add 1 teaspoon of lemon or orange zest along with the vanilla for a fresh flavor.
- Pastel rainbow: Use just a tiny dab of gel color for soft, muted pastel shades.
- Meringue-style: For a lighter, less sweet frosting, use a Swiss meringue buttercream base and tint it in rainbow colors.
Storage and Reheating
Store frosted cakes or cupcakes in an airtight container at room temperature for up to 2 days. If your kitchen is warm (above 75°F), refrigerate them. The frosting can be made ahead and stored in an airtight container in the refrigerator for up to 1 week. Before using, let it come to room temperature and re-whip for 1–2 minutes to restore fluffiness. You can also freeze the unfrosted frosting in a zip-top bag for up to 3 months; thaw overnight in the fridge, then re-whip. Do not microwave the frosting—it will melt.
Frequently Asked Questions
Can I use margarine or shortening instead of butter?
Yes, but the flavor and texture will change. Shortening produces a stiffer, more stable frosting that holds up well in warm weather, but it lacks butter’s rich taste. For best results, use a 50/50 blend of butter and shortening.
Why is my buttercream too runny?
This usually happens if the butter was too soft or if you added too much liquid. To fix it, chill the frosting for 15–20 minutes, then re-whip. If it’s still runny, beat in more sifted powdered sugar, a tablespoon at a time, until it reaches the right consistency.
How do I get vibrant rainbow colors without making the frosting too thin?
Use gel food coloring and add it in small amounts with a toothpick. Gel colors are concentrated, so you only need a tiny bit. If you use liquid coloring, you’ll need more, which can alter the consistency.
Can I make this frosting dairy-free?
Yes. Substitute the butter with a high-quality vegan butter (like Earth Balance) and use a plant-based milk (such as almond or oat milk) instead of heavy cream. The texture may be slightly softer, so chill it before piping.
How far ahead can I pipe the frosting?
You can pipe cupcakes or a cake several hours ahead and keep them at room temperature. For best results, do it the same day you plan to serve. If you need to prepare further ahead, refrigerate the frosted dessert and bring it to room temperature before serving.
Can I use this frosting for a layered cake?
Absolutely. This buttercream is sturdy enough to hold layers. For a rainbow effect on a cake, you can pipe the colored frosting in a spiral on top of each layer, then smooth it out with an offset spatula for a marbled look.