Preheat oven to 350°F. Line 12 cupcake tins with cupcake molds. Set aside.
In a standing mixer fitted with the paddle attachment, mix the butter and sugar on high speed for 2 minutes. Beat in eggs, milk, and vanilla extract.
Turn speed to low and mix in the cocoa powder, flour, baking powder, and salt.
Pour into cupcake molds and bake for 20 minutes. Remove from oven and allow to cool completely on a cooling rack.
While the cupcakes are cooling, make the frosting. Cream the butter and cocoa powder for 2-3 minutes, until the cocoa powder begins to lighten in color. Add in the powdered sugar, milk, vanilla extract, and salt, beating until light and fluffy, about 1 minute.
Frost cupcakes by placing frosting into a piping bag with a large star tip. Swirl the frosting around the cupcake, starting from the middle and working your way outwards. Continue to spiral the frosting up like a pyramid until the cupcake is frosted. Sprinkle with rainbow sprinkles!