Whisk together flour, baking powder, and salt in a bowl. In another bowl, cream softened butter and sugar until light and fluffy. Add egg and vanilla, then gradually mix in dry ingredients until a soft dough forms.
Gently fold chopped raspberries into the dough so they stay intact. If using food coloring, mix it in at this stage. Handle gently to avoid crushing berries and releasing too much juice.
Scoop dough portions onto a parchment-lined baking sheet, spacing cookies about two inches apart. Bake at 350°F (175°C) for 10–12 minutes until edges are lightly golden. Let cookies cool briefly before transferring to a rack.