The handkerchief code—also called the hanky/hankie code, bandana/bandanna code, or flagging—is a system of color-coded cloth handkerchiefs or bandanas used to advertise sexual interests and fetishes without speaking. Color names the act or fetish; pocket side names the preferred role. Left side usually means top (active/dominant in that act); right side means bottom (passive/submissive). A dark blue hanky, for example, signals interest in anal sex; left pocket means prefer to penetrate, right means prefer to receive.
The modern code took hold in the 1970s among gay and bisexual men and BDSM practitioners in the United States, Canada, Australia, and Europe who wanted casual sex or scene partners. Over decades the palette and apparel types proliferated far beyond a few classic colors—but the left/right polarity and the idea of semiotic cruising never fully disappeared from leather culture. Hankies hang from back pockets, belt loops, or are tied on boots and epaulets; some scenes prefer armbands or harness color to cloth. The medium changes; the grammar of color-plus-side stays readable to those who learned it at bars, contests, and older leathermen’s tables.
Origins: Bandanas, Keys, and Competing Origin Stories
Colored bandanas as practical neckwear were common among mid- and late-nineteenth-century cowboys, railroad engineers, and Western miners. One popular origin story places bandanas on gay men in post–Gold Rush San Francisco: with few women available for square dances, blue marked the “male” dance part and red the “female,” worn on the arm, belt, or back pocket.
In the 1970s the modern hanky code became sexual advertising in the gay leather community and broader cruising scenes. Businesses printed meanings for gay clientele. The exact “inventor” is disputed. A common report places New York City around 1970, when a Village Voice journalist joked that instead of only wearing keys left or right (already a top/bottom signal), men could flag specific acts with colored handkerchiefs. Other sources credit marketing around 1971 by San Francisco’s The Trading Post, which sold erotic merchandise and printed cards explaining colors. Alan Selby, founder of Mr. S Leather, claimed he and partners at Leather ’n’ Things built the first expanded code in 1972 after a bandana supplier doubled an order—extra colors needed meanings if they were going to sell. Around 1980, Bob Damron’s Address Book published yearly color charts. All three stories can be partly true: joke, retail, and leather-shop logistics feeding the same semiotic boom.
Classic Colors and Townsend’s Authority List
There is no single official standard, but broad agreement covers core colors. Larry Townsend’s The Leatherman’s Handbook II (1983 second edition; the 1972 first edition lacked the list) is often treated as authoritative. Implicit is left = top/dominant/active and right = bottom/submissive/passive. Townsend warned that you still must talk: someone may wear a color only because the hankie turns them on, or may not know the meaning at all. Online charts balloon into dozens of niche shades; many rare colors are more meme than street practice. Dark blue (anal), red (fisting), black (SM), yellow (watersports), gray (bondage), orange (anything goes / “anything, anywhere” variants in some charts), and a handful of others remain the durable core most leatherfolk still recognize—though exact shade meanings always need a verbal check before you assume consent to a specific act.
That caution is the hanky code’s adult lesson: flagging is invitation and filter, not a signed contract. Wearing red left does not entitle anyone to fist a stranger; it signals openness to be approached about that interest. Negotiation, safer-sex talk, and the right to say no still apply—Townsend’s handbook said so in the leather 1980s, and good dungeon etiquette still says so now.
Present Day: Leather Gear Colors and Digital Cruising
Hanky use has revived in waves even when literal back-pocket cloth is rarer. Color logic now often shows up in the color of harnesses, armbands, boots, and other fetish gear rather than a folded bandana. According to the Schwules Museum, the 1989 creation of the leather pride flag marked a turn from secret signs (hankies included) toward public visibility in gay and general society. Social media and MSM apps further digitized interest signaling—profiles list kinks without risking street harassment that public flagging once invited. The code did not die; it migrated into icons, emoji, and “what I’m into” checkboxes while leather bars still teach classics to new members.
Popular Culture
In the film Cruising (1980), Al Pacino’s Detective Steve Burns gets the code explained by a hanky salesman played by Powers Boothe. The pornographic fisting film Erotic Hands (1980, Bijou Video) fills the opening credits with a red handkerchief. In the early 1980s Judas Priest frontman Rob Halford folded hanky coding into stage costume; in the “Heading Out to the Highway” video he wears red in the left pocket. Brendan Maclean’s 2017 video for “House of Air” depicts and explains the code for a later generation. Further reading often includes Trevor H. Jacques’s On the Safe Edge: A Manual for SM Play (1993).
Why Flagging Still Matters to BDSM
The handkerchief code is pre-app consent theater: public, opt-in advertising of specific acts and roles. It trained leather culture to treat desire as legible information rather than pure luck. Keys on the left or right were the simpler binary ancestor; hankies multiplied the message into a whole menu of acts while keeping the same left/right top-bottom polarity. That menu traveled through leather shops, Damron charts, bar posters, and eventually meme spreadsheets—each generation re-teaching dark blue, red, black, and yellow even when the cloth itself stayed in the drawer.
Related topics: leather subculture, keys-left/keys-right, leather pride flag, cruising history, fisting and SM color classics, and modern gear-color signaling. Homosocialization, urban-legend “sex bracelets,” and queer manicure codes are sometimes discussed alongside hanky flagging as other body-semiotic systems, but the leather hanky remains the best-documented. Whether you still pack a navy bandana or only know dark blue from a bar poster, flagging remains one of kink’s most elegant pieces of folk technology—soft fabric carrying hard intentions.












