"You shall not despise the Edomite, for he is your brother "(Devarim 23:8). This verse holds a hidden meaning that is greatly encouraging for our spiritual growth. The word Edomite, which connotes "red," alludes to sin, as per the verse, "Though your sins be as red as scarlet, they shall become as white as snow." We must not view our misdeeds as despicable, and incapable of being rectified. Rather, we are assured that we can convert our past innappropriate actions to "your brother", i.e, to something positive and beloved as a brother. Meaning, we can reverse our sins to Mitzvot when we perform repentance with love of HaShem, as our Sages taught, "Your intentional sins will become merits."
Although it is human nature to sometimes become overwhelmed by our past sins, the Torah reveals that we must always maintain an optimistic attitude. Indeed, in HaShem's unbounded compassion, He ordains that our sincere repentance effectively converts our negative deeds into positive ones.
Envision a scarlet red garment. See it change colors and become "as white as snow." View your sins as this red scarlet garment. Contemplate on repenting for your sins. Engage in the process of repentance. See the scarlet red garment, and envision it transforming to a white one. So too, envision your "despicable" actions and see them all convert to Mitzvot, light, and endless merits.
(Based on the commentary of the Yesod HaTorah)