Preheat the oven to 350 degrees F.
Add liners to 18 wells across two cupcake pans. Set aside.
In a small bowl, combine the flour, cocoa powders, baking powder, and salt.
In a medium bowl, add the sugars, oil, eggs, and vanilla, and whisk until smooth.
Add the dry ingredients to the wet, and mix until mostly combined.
Lastly, add the milk and whisk until fully combined.
Pour the batter into the prepared cupcake pans, filling each only halfway full.
Use a 3 tbsp cookie scoop to make each cupcake even, and do not overfill or they will spill over in the oven!
Bake the cupcakes for about 20-22 minutes or until the centers spring back when you touch them and a toothpick inserted comes out clean.
Allow the cupcakes to cool completely before decorating.
In a medium bowl, add the chocolate and microwave in 20 second increments until fully melted. Set aside.
In a large bowl, add the egg yolks and 24g (2 tbsp) sugar and use an electric hand mixer to beat on high speed until foamy while you make the sugar syrup.
In a small saucepan, combine the remaining 100g (½ cup) granulated sugar and water, and place over medium heat until it reaches 240 degrees F.
Slowly pour the sugar syrup into egg yolk mixture while mixing to temper the eggs.
Continue mixing for 1-2 minutes until the mixture cools.
Add the butter to the mixture a few cubes at a time, allowing them to fully incorporate before adding more.
Once all of the butter has been mixed in, add the cooled melted chocolate.
Continue mixing until the buttercream is completely smooth.
Transfer the buttercream to a piping bag with a large round piping tip.
Pipe the buttercream onto each cupcake, and top with rainbow nonpareil sprinkles.
