01 - Preheat oven to 350°F. Line a 9x13-inch baking pan with parchment paper and grease lightly.
02 - In a large bowl, beat softened butter and granulated sugar with an electric mixer until light and fluffy, about 2 to 3 minutes.
03 - Add eggs one at a time, mixing well after each addition. Stir in the vanilla extract.
04 - In a separate bowl, whisk together the flour, baking powder, and salt.
05 - Gradually add the dry ingredients to the wet mixture, stirring until just combined.
06 - Transfer the dough to the prepared pan. Spread into an even layer and smooth the surface using a spatula.
07 - Bake for 18 to 22 minutes, or until the edges are lightly golden and the center is set. Avoid overbaking.
08 - Allow to cool completely in the pan on a wire rack before frosting.
09 - Beat softened butter until creamy. Gradually add powdered sugar, then mix in vanilla extract and heavy cream. Beat on high until the frosting is light and fluffy, about 2 minutes.
10 - Separate the frosting evenly into three bowls. Leave one bowl plain (white), tint one with red food coloring, and tint the third with blue food coloring.
11 - Spoon dollops of each colored frosting randomly over the cooled bars. Swirl gently with an offset spatula for a marbled look, or spread distinct sections for stripes. Immediately add red, white, and blue sprinkles.
12 - Cut the bars into 24 squares and serve.