Heat the oven to 350 degrees.
Grease a 13-by-18-by-1-inch half-sheet pan with butter. Line the bottom with parchment paper, then grease and flour the paper.
Prepare the cake: In the bowl of a stand mixer fitted with the paddle attachment, combine the butter and sugar and mix on medium-high speed until light and fluffy, about 3 minutes. Reduce the speed to low and add the eggs, one at a time, scraping down the sides of the bowl after each addition. Add the vanilla and almond extracts and mix until just combined.
In a medium bowl, whisk together the flour, baking powder, baking soda and salt. With the mixer on low, alternate gradually adding the dry ingredients and the buttermilk in several parts, beginning and ending with the dry ingredients. Scrape down the sides of the bowl with a spatula to make sure the batter is well mixed.
Pour the batter into the prepared pan and smooth into an even layer. Bake until the cake is lightly browned on top and a toothpick inserted into the center of the cake comes out clean, 24 to 28 minutes. Cool completely in the pan on a wire rack, about 1 hour.
Meanwhile, prepare the frosting: Place the butter in the bowl of a stand mixer fitted with the paddle attachment, beat on medium speed until light and fluffy, about 30 seconds. Add the cream cheese and mix on medium-low just until smooth, scraping down the sides of the bowl.
Add the vanilla and a few drops of food coloring if desired. Then, with the mixer on low, gradually add the powdered sugar and mix until incorporated, scraping down the paddle and sides of the bowl as necessary.
Frost the cake, decorate with sprinkles or as desired, cut into squares and serve.
