The Handkerchief Code, also known as the Hanky Code or Flagging, is a system of colors used to communicate the wearers kink or preferred sexual position.
Primarily used amongst gay men in the late 70’s and early 80’s, it fell out of use but with the rise of the kink scene has seen a resurgence amongst both gay males and the pansexual community.
It is thought that the code originated from the wearing of bandanas by gay men in San Franciso after the Gold Rush. A code was developed for social dances where, due to a lack of women, men wearing a blue bandana took the male part in a square dance, and men wearing a red bandana took the female role.
It was also common for gay men in New York City in the early 1970’s to wear keys on either the right or left side of their jeans to denote whether they were a “top” or a “Bottom”.
The side a colour is worn is still current, with wearing on the left denoting a top or giver, while right is bottom or receiver. In 1983 the list was featured in Larry Townsend’s The Leatherman’s Handbook, although since the list has ballooned out to include all manner of acts, although many only follow the original list.
Since then the practice of "flagging" has become popular in the kink scene, where gear such as leather chaps or vests are striped with a particular colour. This can extend to all kinds of clothing, from jockstraps and wristbands, down to bootlaces. New generations who are into the system can even get an iPhone cover in their preferred colour and hanky "pattern"
One would have to also think that a man with all colours in his pockets is either ultra kinky - or a magician.