In the early 1970s, some gay men — particularly in the leather scene — began to wear colorful handkerchiefs to signal their sexual interests (e.g., oral sex, bondage, water sports) and the role they wanted to play (active/top, passive/bottom). While gay usage is believed to originate in New York City, it was based on a San Francisco tradition that dates back to the mid-1800s.
In the 1800s, handkerchiefs were commonly used in the American west by cowboys, miners, and railroad engineers. When gold was discovered in California in 1848, the style was carried on by prospectors who flocked to the state to try to strike it rich
San Francisco’s population exploded from 200 in about 1946 (when California was claimed from Mexico in the Mexican-American War and the City was officially renamed from its original name of Yerba Buena) to about 36,000 in 1852, just six years later. An overwhelming percentage of the population were men. As a result, men were forced to dance together at socials, with some men wearing a blue bandanna to show that they were assuming the male leading parts in the dance while others wearing red bandannas to show they were taking the female following role in the dance.
The modern usage by gay men is believed to date back to the early 1970s when a journalist for the Village Voice joked that instead of using keys on the left or right pocket to indicate top or bottom in the bedroom — the prevailing custom at the time — colorful handkerchiefs could be used to signal more specific interests.
Though usage of the hanky code waned in the early 1980s, the use of hanky’s as an accessory to signal your kinks is making a comeback. Want to know which color to flag in the leather bar? Check out the most common hanky code colours below.