In a medium bowl, whisk together flour, salt and baking powder.
In the bowl of an electric mixer, beat together butter and sugar on medium speed until pale and fluffy. Beat in the eggs and vanilla extract.
Reduce speed to low. Gradually add the flour mixture until evenly distributed.
Divide the dough into three equal sections and roll into a ball. Wrap the ball in plastic wrap, and flatten into a disk. Refrigerate until firm, about 1 hour or overnight.
Preheat the oven to 325°F (165°C). Bring one disk of dough out to sit out at room temperature until softened, about 10-15 minutes.
On a lightly floured surface, roll out the dough with a rolling pin until just under 1/4 inch thick. Add more flour as needed to keep dough from sticking.
Cut out cookies with cookie cutters and transfer shapes to a cookie sheet lined with parchment paper. Roll out scraps and repeat.
Chill cut out cookies in the freezer for 15 minutes before baking. Transfer to the oven and bake for 13-18 minute, or until golden brown on the edges. Let cool completely on wire racks.
Meanwhile, make royal icing. In the bowl of an electric mixer, whisk together egg whites and powdered sugar for about 5 minutes. Mixture should be opaque and shiny. Stir in the lemon juice and continue whipping until evenly distributed, about 3 minutes. Icing should be light, fluffy and slightly stiff, but you may need to add more lemon juice (if too dry) or powdered sugar (if too wet) to reach the desired consistency. Add food color if desired.
Frost the cookies with a metal spatula or piping bag and nozzle. While icing is wet, add sprinkles if desired. Let icing harden completely, around 30 minutes.
Using a paintbrush and a small cup of water, "paint" pieces of the silver foil or gold foil onto the cookies in a confetti pattern. Let dry.
Store iced cookies in an airtight container at room temperature for up to one week.
Notes
The icing has a subtle lemon flavor. If you’re not a lemon fan, you can use water in its place.