01 - Preheat oven to 350°F. Line a 9-by-13-inch baking pan with parchment paper and lightly grease.
02 - In a large mixing bowl, beat unsalted 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 thoroughly after each addition. Stir in vanilla extract.
04 - In a separate bowl, whisk together all-purpose flour, baking powder, and salt.
05 - Gradually add flour mixture to the wet ingredients, mixing until just combined.
06 - Transfer the dough to the prepared baking pan. Spread evenly 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. Do not overbake.
08 - Place the pan on a wire rack and allow the cookie bars to cool completely in the pan.
09 - In a mixing bowl, beat unsalted butter until creamy. Gradually add sifted powdered sugar, mixing well. Blend in vanilla extract and heavy cream or milk. Beat on high speed until light and fluffy, about 2 minutes.
10 - Divide frosting among three bowls. Leave one bowl plain. Tint one bowl red and another blue using gel food coloring.
11 - Dollop spoonfuls of each frosting color across the cooled bars. Swirl gently with an offset spatula for a marbled appearance or create colored stripes as desired.
12 - Immediately scatter red, white, and blue sprinkles over the frosted bars.
13 - Cut into 24 bars and serve.