In a large mixing bowl, cream together the powdered sugar, margarine, and unsalted butter using an electric mixer until the mixture is smooth and fluffy. This should take about 2-3 minutes. Add the egg, vanilla extract, and almond extract, and continue mixing until everything is well incorporated.
In a separate bowl, whisk together the cake flour, cornstarch, baking soda, baking powder, cream of tartar, and salt. Slowly add this dry mixture to the wet ingredients, mixing on low speed until just combined. Be careful not to overmix; the dough should be soft and slightly sticky.
Wrap the dough in plastic wrap and refrigerate for at least 1 hour until it is firm enough to handle. This step is essential for making the dough easier to work with and helps prevent the cookies from spreading too much while baking.
Preheat your oven to 350°F (175°C). Line your baking sheets with parchment paper to prevent sticking and ensure even baking.
Scoop about 1 1/2 tablespoons of dough for each cookie and roll into balls. Place them on the prepared baking sheets, about 2 inches apart. Gently press each ball down with the palm of your hand to flatten it slightly.
Bake the cookies for 8-10 minutes, or until the edges are just set and the tops are slightly golden. Be careful not to over bake as you want the cookies to be soft. Let them cool on the baking sheet for 5 minutes before transferring to a wire rack to cool completely.
To make the frosting, beat the softened butter in a medium bowl until creamy. Gradually add the powdered sugar while mixing on low speed. Once combined, add the vanilla extract, milk, and salt. Increase the speed to medium and beat until the frosting is light and fluffy. Add food coloring and mix until the color is evenly distributed.
Once the cookies are completely cooled, spread a generous amount of frosting on each one. Add rainbow sprinkles on top for decoration.
Allow the frosting to set for a few minutes before serving. Store any leftover cookies in an airtight container at room temperature to keep them fresh. Enjoy!