Preheat the oven to 350°F. Line a cupcake pan with paper liners.
In a large mixing bowl, cream together the softened butter and granulated sugar until light and fluffy. Add the eggs, vanilla extract, and almond extract, mixing until well combined.
In a separate bowl, whisk together the flour, baking powder, baking soda, and salt. Gradually add the dry ingredients to the wet ingredients, alternating with the buttermilk, beginning and ending with the flour mixture. Mix until just combined.
Fold in the rainbow sprinkles. Divide the batter evenly into three bowls. Tint one bowl with red food coloring, one with blue, and leave one plain.
Spoon the colored batters into the cupcake liners, alternating colors to create a funfetti effect. Bake for 18-20 minutes or until a toothpick inserted into the center comes out clean. Allow to cool completely in the pan before transferring to a wire rack.
For the frosting, beat the softened butter in a large bowl until creamy. Gradually add the powdered sugar, mixing on low speed until combined. Add 2 tablespoons of heavy cream and vanilla extract, then beat on high speed until light and fluffy. If the frosting is too thick, add more cream as needed.
Divide the frosting into three bowls and tint one red, one blue, and leave one white. Frost the cooled cupcakes with the colored frostings, creating swirls or patterns as desired. Top with extra rainbow sprinkles.