Handkerchief code
The handkerchief code (hanky code) is a system of colored bandanas worn in the left or right back pocket that gay men, especially in leather circles, used from the early 1970s to signal their interests, with origins credited to both San Francisco and New York.
The handkerchief code is a way of signalling interests without speaking: a colored bandana in a back pocket, its color naming a preference and its side, left or right, indicating which role the wearer took. It grew out of an existing custom of wearing a ring of keys on the left or right to mean top or bottom. The code is closely tied to the leather scene: its best-known origin story begins in leather shops, and leather magazines printed its charts. Early charts listed about a dozen colors, but the Leather Archives and Museum says most people used six to eight.
Origins
Who started it is disputed. The account most often repeated credits Alan Selby, founder of Mr. S Leather in San Francisco, together with Ron Ernst and Pat O'Brien of the shop Leather 'n' Things, with launching the code in 1972. Selby recalled that a bandana supplier had doubled an order and that the shop sold the surplus by giving each color a meaning; he remembered about 12 starting colors, though his biographer Jordy Jones doubts the detail is exact. A competing New York account says a Village Voice journalist joked in the early 1970s that colored handkerchiefs could say more than keys. Gary Wasdin of the Leather Archives and Museum says the code took hold in both San Francisco and New York in the early 1970s and cites an early-1970s Village Voice chart as one of the few printed references that survive. A 1976 letter to Drummer called the whole code a media hoax linked to a 1975 Village Voice article on S&M.
Spread and charts
Drummer printed its own version of the chart in 1977, and the lists kept growing. Jim Ward of The Gauntlet is credited with adding purple around 1978, and by 1993 Trevor Jacques's guide On the Safe Edge listed 71 colors and objects. The code also entered art: Hal Fischer's photographic series Gay Semiotics, made in the Castro and Haight-Ashbury in 1977 and published as a book in 1978, catalogued the hanky and other signals of street dress, and the J. Paul Getty Museum has acquired six of its prints.
Decline and revival
Use declined in the early 1980s, but the code never vanished. Some leathermen still wear it, sometimes with irony or as a retro nod, and the Leather Archives and Museum notes a revival in which the colors also express identity rather than only preference. The GLBT Historical Society in San Francisco displays a Gay Monopoly game whose mascot carries knotted multicolored hankies in his back pocket, a sign of how familiar the code had become. On this site, bandanas show up across the plates from Drummer, Honcho and Mandate of the late 1970s and 1980s.
Gallery: Vintage gay bandanaGallery: The Castro clone lookGallery: Vintage gay leather artGallery: Drummer magazine
In the archive
"Tattooed Sailor and the Hoods", 1962
"Out of court?" Tom of Finland cover, Feb 1968
Drummer 5: Chuck Arnett cover, Mar/Apr 1976
Drummer 8: Val Martin painted by Cliff Raven, Sep 1976
Drummer 9: Gloria Hole of the Cycle Sluts, Oct 1976
Drummer 10: Holiday Issue by Rex, 1976
Body Casting by Taylor of San Francisco, 1977
Gold Coast, 501 N. Clark, Chicago, 1977
The Pleasure Chest, drawn by Rex, 1977
CMC Carnival: hard hat and aviators, 1977
Intermountain Logging Company opener, Drummer 12, 1977
Drummer 13 cover, leather cap and cover lines, 1977Quick answers
What is the hanky code? A system in which gay men, especially in leather circles, wore a colored bandana in the left or right back pocket to signal their interests and preferred role. It developed in the early 1970s.
Who invented the hanky code? It is disputed. One account credits Alan Selby of Mr. S Leather and Leather 'n' Things in San Francisco in 1972; another traces it to a joke by a Village Voice journalist in New York in the early 1970s.
When did Drummer publish a hanky code chart? Drummer printed its version in 1977, a year after a reader's letter in the magazine dismissed the code as a media hoax.
Is the hanky code still used? Less than in the 1970s, but some leathermen still wear it, sometimes ironically, and it has seen a revival as a way of signalling identity.

See also
Clone (Castro clone)Drummer (magazine)The Eagle (gay leather bars)The Stud
Sources
- Vestoj: Colour codes (Jordy Jones)
- SF Gay History: Origins of the hanky code
- Metro Weekly: the hanky code, with Gary Wasdin of the Leather Archives and Museum
- J. Paul Getty Museum: If you know, you know (Hal Fischer)
- GLBT Historical Society: Queeriosities
"Handkerchief code." The Encyclopedia of Gay Art, Vintage Gay Art, updated 2026-11-25. https://vintagegayart.com/encyclopedia/handkerchief-code.html