Sift 3 1/2 cups powdered sugar through a fine-mesh strainer into a large bowl.
Place 4 large pasteurized egg whites (or 1/2 cup liquid egg whites) in the bowl of a stand mixer fitted with a whisk attachment. (Alternatively, use an electric hand mixer and large bowl.)
Whip on medium-high speed until foamy, doubled in volume, and opaque, about 2 minutes.
Turn the mixer off and add half of the powdered sugar. Mix on low speed until the powdered sugar is completely dissolved and no large lumps remain, 1 to 2 minutes. Add the remaining powdered sugar and continue mixing until completely dissolved, 1 to 2 minutes more.
Increase the mixer speed to high and whip until the icing is completely smooth, glossy, and slightly thickened, 4 to 5 minutes. The icing should hold a soft peak and slowly run off of the whisk attachment. If the icing is too loose, add more powdered sugar, 1/4 cup at a time, and continue mixing until completely incorporated.
Decrease the mixer speed to low and add 1 teaspoon extract and a few drops of food coloring, if desired. Mix until the icing is smooth and evenly colored, 1 to 2 minutes.
Decorate cookies with the icing by piping and let completely dry before touching them, at least 4 hours.