01 - Preheat the oven to 350°F. Line a 9 by 13 inch baking pan with parchment paper and lightly grease.
02 - In a large bowl, beat the softened butter and granulated sugar together until light and fluffy, about 2 to 3 minutes.
03 - Mix in eggs one at a time, beating well after each addition. Blend in vanilla extract.
04 - In a separate bowl, whisk together all-purpose flour, baking powder, and salt.
05 - Gradually mix the dry ingredients into the wet mixture until just combined.
06 - Evenly spread the cookie dough into the prepared baking pan and smooth the top with a spatula.
07 - Bake for 18 to 22 minutes, until the edges are lightly golden and the center is set. Avoid overbaking.
08 - Place the pan on a wire rack and cool the bars completely before frosting.
09 - Beat the softened butter until creamy. Gradually blend in powdered sugar, then mix in the vanilla extract and heavy cream. Whip on high speed until light and fluffy, about 2 minutes.
10 - Divide the frosting into three bowls. Leave one portion plain. Tint the second with red gel food coloring and the third with blue gel food coloring.
11 - Dollop spoonfuls of each color frosting over the cooled bars. Swirl with an offset spatula for a marbled effect or spread in sections for stripes.
12 - Immediately garnish with red, white, and blue sprinkles. Cut into 24 bars and serve.