Wow, that IS a peculiar custom. I would never have guessed. Apparently Knox's trousers were red at St. Andrew's, however, because it's a red cushiony thing that bops graduates on the head there.
From The Guardian:
"The tradition at Edinburgh University is to tap the head of every graduate with a cap believed to be made from the seat of John Knox's breeches. John Knox was the renowned Calvinist, reformer and founder of the Presbyterian Church. The cap anoints the heads of 5,000 graduates a year and two years ago needed restoring. The restorers discovered a label inside, dated 1849. John Knox died in 1572, but the tradition continues. St Andrew's University also uses cloth claimed to be from a pair of Knox's trousers in its graduation ceremony