1 1/2 cups (3 sticks) unsalted butter, chilled, cut into small pieces
3/4 cup sugar
2 teaspoons pure vanilla extract
3 cups plus 1 tablespoon all-purpose flour, plus more for dusting
Pinch of salt
Red and blue paste food colorings
Cut a 3-by-5-inch template out of lightweight cardboard, or create a template by stacking several index cards together, then wrapping them in plastic wrap, leaving one side smooth; set aside. Line 2 baking sheets with Silpat baking mats or parchment paper, and set aside.
Preheat oven to 325 F. In the bowl of an electric mixer fitted with the paddle attachment, cream butter and sugar for 1 minute. Add vanilla, flour, and salt, and mix until just combined, 1 to 2 minutes more.
On a lightly floured surface, roll out dough to 1/4 inch thick. Place the smooth side of the template onto the dough, and cut out a rectangle using a paring knife; repeat to make a total of sixteen rectangles, re-rolling dough as needed.
Transfer rectangles to prepared baking sheets using a wide spatula. Chill for at least 1 hour.
Bake cookies until they are just beginning to color and are lightly firm to the touch, 15 to 18 minutes. Remove to cooling rack, and let cool completely.
Divide the royal icing evenly among four bowls, and cover each tightly with plastic wrap. Set one bowl aside for outlining the cookies. Add red food coloring to one of the bowls, and mix thoroughly, adding more food coloring if necessary to obtain desired color. Add 2 to 3 teaspoons of water to icing so that it is loose enough to flow easily off of a spatula when lifted and forms a ribbon that dissolves almost immediately. Replace plastic wrap, and cover tightly. Repeat this process with another bowl of icing using blue food coloring. To the third bowl of icing, add just the water, and mix thoroughly. Recover all bowls tightly with plastic wrap.
Transfer the reserved outlining icing to a small pastry bag fitted with a #5 tip. Pipe an even line on the outside edges of the cookie. Divide the cookie in half with a horizontal line. To form the outline of the canton (the field of stars), pipe a vertical line one third of the way from the left side of the cookie until it meets the first horizontal line. To form the stripes, pipe two evenly spaced horizontal lines above the original horizontal line and to the right of the canton. Pipe three more evenly spaced horizontal lines from left to right under the canton. Repeat this process on the remaining cookies. Reserve the icing in the pastry bag for the stars. Allow the icing to dry for at least 1 hour.
Place the remaining three icings into separate squeeze bottles. Flood the field of stars with enough blue icing to fill the space evenly without overflowing. Use the tip of a small knife or a wooden skewer to push the icing completely into the corners. Using the same technique, flood every other stripe with the red icing. Allow the icing to dry for at least 2 hours. Flood the remaining stripes with the white icing.
Change the tip of the pastry bag with the reserved white icing to a #16 tip. Pipe out as many stars onto the blue icing as will fit. Allow the icing to dry. Store in an airtight container at room temperature for up to 1 week.