Ingredients: Gather 1 cup of unsalted butter (at room temperature), 4 cups of powdered sugar, 2-3 tablespoons of heavy cream or milk, 1 teaspoon of vanilla extract, and gel food coloring in various colors.
Creaming Butter: In a large mixing bowl, beat the butter until creamy using a hand mixer or stand mixer.
Adding Sugar and Vanilla: Gradually add the powdered sugar to the butter, mixing well after each addition. Blend in the vanilla extract until smooth.
Adjusting Consistency: Add heavy cream or milk, one tablespoon at a time, until the frosting reaches your desired consistency. It should be smooth and spreadable but not too thin.
Coloring the Frosting: Divide the frosting into separate bowls, one for each color you want to use. Add a small amount of gel food coloring to each bowl and stir until the desired color is achieved.
Swirling the Colors: To create the rainbow swirl effect, spoon small dollops of different colored frosting onto the surface of the cake or cupcakes.