Heat oven to 350°F (175°c). Line the bottom of an 8-inch square cake pan with parchment paper, and either butter the parchment and exposed sides of the pan, or spray the interior with a nonstick spray.
In a large bowl, use a hand or stand mixer to beat the butter and sugars until fluffy; scrape down bowl.
Add the egg, yolk and vanilla and beat until combined, then the buttermilk and mix again.
Scrape the bowl down well and don’t worry if the batter looks uneven.
Place your flour, cocoa, baking soda, baking powder and salt in a sifter and shake it over the batter bowl.
Stir on low until just combined; scrape down bowl a final time.
Scoop batter into prepared pan and smooth flat.
Bake for 18 to 22 minutes, until a toothpick inserted into the center comes out clean.
Let cool for 5 to 10 minutes in cake pan on cooling rack, then flip out onto rack or serving plate to completely finish cooling before frosting.
Make the frosting: Place frosting ingredients in a food processor and run machine to mix.
Scrape down bowl then process for another 1 to 2 minutes just until smooth and somewhat fluffed.
Scoop the frosting onto the cooled chocolate cake and swirl it around.
Finish with rainbow sprinkles; cut into squares.
