The pink color comes partially from the vinegar breaking down the red skin of the onion and partially from a chemical reaction between the vinegar and the onion cells.