While the cupcakes bake and cool, beat the softened butter on medium-high speed for about 5 minutes, or until pale and fluffy.
Add the powdered sugar, milk, vanilla extract, and salt. Beat on low speed until the powdered sugar is incorporated, then increase the speed to high and beat for about 2 minutes, until smooth and fluffy.
Check the consistency. The frosting should be firm enough to hold a piped swirl. If it is too thick, beat in additional milk a little at a time. If it is too thin, beat in additional powdered sugar.
Transfer about 1 cup of frosting to a small bowl. Stir in yellow food coloring a few drops at a time until you reach the desired shade. Set aside for the witch hat decorations.
Beat purple food coloring into the remaining frosting until the color is even.
Transfer the purple frosting to a piping bag fitted with a large star tip. Pipe a swirl onto each completely cooled cupcake.