Oh who is that young sinner with the handcuffs on his wrists?
And what has he been after that they groan and shake their fists?
And wherefore is he wearing such a conscience-stricken air?
Oh they're taking him to prison for the colour of his hair.
'Tis a shame to human nature, such a head of hair as his;
In the good old time 'twas hanging for the colour that it is;
Though hanging isn't bad enough and flaying would be fair
For the nameless and abominable colour of his hair.
Oh a deal of pains he's taken and a pretty price he's paid
The whole poem uses hair color as a metaphor for sexuality, and having the “wrong” hair color as a metaphor for being gay. Being convicted of sodomy, then defined as a sex act between two men, carried the death penalty in England from 1533 until 1861. By the time Oscar Wilde was convicted, the sentence was two years of hard labor. This does not mean it was not still a death sentence, however–to any man who was not used to hard labor, any hard labor sentence of more than a few months was expected to degrade their health to the point where they were not expected to survive post-prison for more than a few years–and, indeed, Oscar Wilde only made it for three.
Oh Who Is That Young Sinner