Why is purple the color of Lent? I was just reading Mark 15:17-20 (ESV) (emphasis mine):


  And they clothed him in a purple cloak, and twisting together a crown of thorns, they put it on him.  And they began to salute him, “Hail, King of the Jews!” And they were striking his head with a reed and spitting on him and kneeling down in homage to him. And when they had mocked him, they stripped him of the purple cloak
  and put his own clothes on him. And they led him out to crucify him.


Is this why purple is the color of Lent?
It's actually kind of a contradiction.  Which isn't surprising as Christ was a sign which would be contradicted (see Luke 2:34).  Purple is a kingly color, which is why they put it on Jesus to mock Him.  Purple is also, or has become, the penitential color for the Church, it is also the color worn and used to decorate churches during Advent. 

Purple is certainly penitential in contrast to Rose, which is the color of Joy, worn on Laetare in Lent and Guadete sunday in Advent. But, the only other person to wear Purple clothes in the New Testament was the rich man (who went to Hell) in the parable of Lazarus (Luke 16:19). But his wearing purple is a sign of his wealth and vainglory.

Each of the ways the soldiers mocked Jesus have become for Christians a sign of His eternal glory.