For the cupcakes:
Preheat oven to 175°C.
Line a muffin tin with cupcake papers.
In an electric mixer fitted with the paddle attachment, beat all ingredients together except rainbow sprinkles. Beat on high speed for 3 minutes, scraping down the bowl occasionally. When thoroughly mixed, gently fold in rainbow sprinkles. Stir only briefly, because the colors will begin to run quickly.
Pour batter evenly into cupcake papers. Bake for 20 minutes, or until a toothpick comes out clean. Let cool completely before frosting cupcakes.
For the boiled frosting:
In a large saucepan, whisk together flour and 120ml milk until smooth. Set over medium heat and and whisk in remaining milk and salt. Whisk constantly until mixture is thick and paste-like. Remove from heat and let cool completely.
In the bowl of a stand mixer fitted with the whisk attachment, combine butter and sugar. Beat until light and fluffy. Add vanilla and mix well.
Beat cooled flour mixture into the butter mixture on high speed. Beat for several minutes (6-10) until sugar granules have dissolved. You can check this by rubbing a little between your thumb and forefinger.
Frost cooled cupcakes and decorate with sprinkles.
Recipe courtesy of Heather Baird, author of SprinkleBakes.