01 - Set oven to 350°F. Line a 9 by 13-inch baking pan with parchment paper and lightly grease the surface.
02 - In a large mixing bowl, beat the butter and granulated sugar together with an electric mixer at medium speed until pale and fluffy, about 2 to 3 minutes.
03 - Add eggs one at a time, mixing well after each addition. Blend in the vanilla extract.
04 - In a separate bowl, whisk together the all-purpose flour, baking powder, and salt until thoroughly combined.
05 - Add the dry mixture gradually into the creamed butter mixture, mixing just until incorporated and no dry flour remains.
06 - Transfer dough into the prepared baking pan and spread in an even layer using a spatula. Smooth the surface.
07 - Bake for 18 to 22 minutes, until the edges turn light golden brown and the center is set. Avoid overbaking.
08 - Allow baked bars to cool fully in the pan on a wire rack before frosting.
09 - In a mixing bowl, beat softened butter until creamy. Gradually add powdered sugar, then vanilla extract and heavy cream or milk. Beat on high until frosting is light and fluffy, about 2 minutes.
10 - Divide frosting evenly among three bowls. Leave one uncolored for white. Tint the other two bowls with red and blue gel food coloring respectively, mixing well for vibrant colors.
11 - Spoon dollops of each colored frosting over the cooled surface. Gently swirl with an offset spatula for a marbled effect or spread in distinct sections for stripes.
12 - Immediately sprinkle red, white, and blue sprinkles over the frosted bars.
13 - Cut into 24 even bars for serving.