How to Make Rainbow Swirl Buttercream

Creamy, perfectly sweet buttercream with a stunning rainbow swirl. Use this to top cupcakes or create unique rosettes on a cake. Add a little edible glitter and you will have a showstopper dessert!

This post may contain affiliate links from which, at no additional cost to you, I may earn a small commission to keep this site running. Only products I myself would or do use are recommended.

I feel like birthday cakes and cupcakes tend to fall into one of two categories: either it looks great OR it tastes great. Obviously there are exceptions, but I generally don’t enjoy eating those airbrushed, over-the-top birthday cakes. And the cupcakes are even worse because they’ve usually dried out!

So, when my friends asked me to make rainbow cupcakes for their daughters’ birthday party, I was excited to try my hand at this technique. It always looked so easy, but I know looks can be deceiving.

Turns out, this rainbow swirl buttercream really is as simple as it looks!

All you need are a few key tips and you can easily make this yourself at home! Promise.

How to make rainbow swirl buttercream

1. First, make a large batch of vanilla American buttercream. Do this 1-2 days ahead, if possible, so the colors can deepen in the fridge.

2. Divide it among as many bowls as you’ll have colors (usually 5-7).

3. Dye each bowl using GEL food coloring. Each color is different and will require different amounts of dye to achieve your desired shade.

4. Cover and refrigerate at least 1 hour, ideally overnight.

5. Adjust the color as needed. You’ll need to let it come to room temperature, first. This takes anywhere from 30 minutes to 3 hours, depending on your climate and how long it refrigerated for. If needed, refrigerate longer to deepen the color more then let come to room temperature before the next step.

6. Put each color in its own piping bag.

7. Create 1” wide lines of each color on a piece of plastic wrap. Be sure the colors touch but don’t mix/bleed.

8. Roll the colors into a log and twist the ends closed.

9. Trim one end and place in a piping bag fitted with your desired piping tip.

10. Pipe in rosettes or a tall swirl (as seen here, using a 6B tip).

Pairs well with:

Chocolate Cupcakes

Champagne Cupcakes

Black Chocolate Cupcakes (if you choose to do dyed marshmallow, add the coloring before the marshmallow to avoid overmixing)

Lemon Curd Cupcakes

Vanilla Cupcakes

Dark Chocolate Mocha Cupcakes

Tips and notes for this recipe

Use the fridge to help deepen your colors

This does require some planning ahead, but the colors can deepen dramatically in the fridge. This is especially helpful with colors in the red family, like red (obvi) and pink and purple. I did mine 2 days in advance. So day 1 was making the colors and popping them in the fridge. Day 2 was defrosting these to dye the pinks a little more (and baking 4 dozen cupcakes…). Day 3 I simply defrosted the bowls of frosting (this takes around 2-3 hours on the counter) then creating the rainbow “logs” and piping the cupcakes. Easy!

Create several rainbow “logs”

Sadly, each “log” (I know that’s a terrible name for it, but I don’t know what else to call it???) only frosts 3-4 cupcakes if you do the tall piping like I did. You can probably get closer to 6 of making rosettes. So, just know this ahead of time and create several rainbow logs before you start.

Pipe by squeezing from the end ONLY

I’m notorious for squeezing from the middle of my piping bags. I also do this with my toothpaste, so I suppose it’s very telling of me as a person? Anyway, you’re always supposed to twist the bag right above the frosting and pipe from there. I usually get away with not doing that, but you just can’t with this frosting. Usually, you have a nice cone to hold onto, but this time it will be a somewhat awkward cylindrical log that will only pipe evenly if done the right way. Plus, if you squeeze from the middle, you can quickly melt the frosting and cause the colors to bleed and turn into one yucky brown mess. So, squeeze from the end only.

Set the tone with sprinkles, edible glitter, or luster dust!

I used these edible stars to match a photo we’d been working from. However, you could use gold stars, edible glitter, or luster dust. These really help make the cupcakes pop!

Use neutral or complementary cupcake liners

This is not the time to use those funky cupcake liners. Use something neutral that won’t let the fats from the cupcakes bleed through, like gold or silver to match your stars, blue to represent the sky, or white to represent clouds! Just be aware: white foil liners tend to look slightly grey-ish white, but they’ll still give you the desired effect!

My buttercream tools

Aside from what’s already been mentioned, here are the tools I used for making this buttercream. Affiliate links provided.

Stand mixer or handheld mixer

1M piping tips or 6B piping tips

Reusable silicone piping bags

Below are the gel dyes I used to create my colors.

Rainbow Swirl Buttercream

  • total time: 20-25 minutes (plus chilling time to deepen the color, if possible)

yields: about 3 cups (enough to thickly frost 24 cupcakes)

Ingredients:

  • 2 cups (16oz) unsalted European style butter, softened
  • 5-8 cups (650-1,040g) powdered sugar
  • 4 teaspoons (16g) pure vanilla extract
  • ½ teaspoon (3g) sea salt
  • ½ to 1 teaspoon gel food coloring in desired colors (5-6 colors is ideal)
  • 2-4 tablespoons heavy whipping cream (optional--use only as needed)
  • optional: silver or gold edible stars

Instructions:

  1. Add butter to the bowl of your stand mixer fitted with the paddle attachment (or a large, deep mixing bowl and using a hand mixer). Beat butter on high for 1-2 minutes, scraping down sides and bottom of bowl with a rubber spatula a couple times.
  2. Add powdered sugar one-ish cup at a time, starting mixer on low to avoid a poof of sugar flying everywhere. Slowly increase speed to high, mixing until smooth after each addition (about 30 seconds or so for each cup). Scrape down bowl every 2-3 cups. If it’s looking grainy, add a small splash of cream when you scrape the bowl.
  3. After adding about 5 cups powdered sugar, add vanilla and salt and mix until fully combined. Taste your frosting and keep adding sugar, this time ½ cup or less at a time, until it reaches your desired taste or thickness. Remember that the food coloring will thin it out slightly. Add cream as needed, in small splashes, to smooth out the frosting (but remember that the next step will help smooth it as well). Don’t add too much cream, as there’s no recovering from that. Be conservative—you can add more later.
  4. Once you’re happy with the taste/thickness, scrape down the bowl again then beat on high for 3-5 minutes. I sometimes scrape the bowl once in the middle of this if I notice a yellower tinge along the edge of the bowl (see note about achieving a truer white color). This tinge just means the buttercream on the edge isn’t getting pulled in and whipped as quickly as the rest, and it can happen if you’re making a smaller batch or if you have a larger stand mixer.
  5. At this point, divide buttercream evenly between 5-6 bowls (or however many colors you’re doing). Using a small spatula or spoon, stir in about ⅛ teaspoon of each color into each bowl and stir in until well-blended. Continue to mix in dye until you’re happy with the color. Don’t be scared to add tiny amounts of another color to adjust it to your likings. Below I’ve included the color combinations I used. Some colors, like yellow, don’t need much gel, while others, like red and pink, need a lot more dye to get a rich color.
  6. If possible, refrigerate the bowls of frosting (well-covered with plastic wrap) overnight. This will help deepen each color quite a bit. About 2-3 hours before using, remove from fridge and let come to room temperature (keep covered until using so the condensation from defrosting attaches to the plastic wrap). Stir well. You can adjust the color if it’s still not to your liking. In fact, I like to make my buttercream 2 days in advance so that I can refrigerate overnight a second time, after adjusting the color once.
  7. Once the color is to your liking (and the frosting has defrosted, if necessary), stir well then place in a piping bag.
  8. Prepare your “main” piping bag by placing a piping tip in a piping bag (I used 6B but 1M also works well). Opt for a smaller one (10” or 12”), as the rainbow “log” you’ll create in the next step is rather thin and it’ll be easier to hold with a smaller piping bag around it.
  9. To create the rainbow swirls, place a 10” to 12” piece of plastic wrap on your counter. In roughly the middle of the wrap, create a line of your first color of frosting (parallel with the short ends). Make this about 1” thick, leaving about 2” of extra plastic wrap at either end. Continue this process with each of the colors, ensuring that they just barely touch each other and filling in any gaps that are made. Try to make sure they are the same length and thickness.
  10. Once all of the colors are laid out, gently but firmly take the long edge of plastic wrap from one side and roll the colors over each other until they’re like a cookie dough log. Continue rolling until the plastic is all wrapped around your rainbow log. Twist the ends (that 2” you left at the top and bottom when you created the lines of color). Trim the twisted portion of one end right against the frosting (your scissors may get a little dirty). Place this in your prepared piping bag. Note: you will likely need to repeat this process several times to frost all of your cupcakes. I did a tall piping and was able to do 3-4 cupcakes per rainbow “log”.
  11. To pipe, be sure to squeeze from the very end of the piping bag. To make a rosette, start in the middle of the cupcake and spiral outward. To create a tall swirl (as seen here), start on the outside and swirl inward then once you’ve covered the whole cupcake, work your way into an upward swirl for a second layer.

Enjoy!

If not using that day, place in a sealed container or piping bags (if using the next day) and refrigerate. Frosting will last, tightly sealed, in the fridge 2-3 weeks or in the freezer about 2 months. Let come to room temperature before using. Depending on how long you chilled it, you may need to whip it quickly in your stand mixer or with a hand mixer to fluff it back up.