Prepare the Macaron Shells:
Line baking sheets with parchment paper or silicone mats.
Sift together the powdered sugar and almond flour into a large mixing bowl to remove any lumps.
In a separate bowl, beat the egg whites with an electric mixer on medium speed until frothy. Gradually add the granulated sugar and increase the speed to high. Beat until stiff, glossy peaks form.
Add gel food coloring, if desired, and gently fold it into the meringue.
Gradually fold the dry ingredients into the meringue in three parts. Use a spatula to mix until the batter flows like lava and forms ribbons when lifted. Be careful not to overmix.
Transfer the batter to a piping bag fitted with a round tip and pipe small circles (about 1 1/2 inches in diameter) onto the prepared baking sheets.
Tap the baking sheets on the counter several times to release air bubbles. Let the macarons sit at room temperature for 30-60 minutes until a skin forms on the surface (they should no longer be sticky to the touch).
Bake the Macarons:
Preheat your oven to 300°F (150°C).
Bake one tray at a time for 15-18 minutes. The macarons are done when they have developed feet (the ruffled edges) and lift easily from the parchment.
Allow the macarons to cool completely before removing them from the baking sheet.
Make the Pistachio Buttercream:
In a mixing bowl, beat the softened butter until creamy.
Add the powdered sugar and continue beating until smooth.
Mix in the pistachio paste. Add milk, if needed, to achieve a spreadable consistency.
Prepare the Raspberry Filling:
In a small bowl, combine the raspberry jam and lemon juice. Stir well to balance the sweetness.
Assemble the Macarons:
Pair the macaron shells by size.
Pipe a ring of pistachio buttercream onto one shell of each pair, leaving the center hollow.
Spoon a small dollop of raspberry jam into the center of the buttercream ring.
Top with the second shell, pressing gently to seal.
Mature the Macarons:
Place the assembled macarons in an airtight container and refrigerate for 24 hours to allow the flavors to meld. Bring them to room temperature before serving.