Place the red onion sliced in a glass jar with a lid.
In a medium saucepan, combine the sugar, vinegar, salt, and peppercorns. Bring mixture to a boil. Whisk until sugar and salt dissolve. Remove pan from heat and pour into a glass container with the onions. If not enough liquid to cover the onions, add enough water to get onions covered. Allow to cool and cover with the lid. Place in the refrigerator. This is refrigerator pickling only and can be stored for up to one month.