The Bandana Code: What Every Colour Means, Where It Came From, and How It Evolved

If you've ever seen someone at a queer event, leather bar, or pride with a bandana hanging out of their back pocket and wondered whether it meant something, it did, or at least it might have. The bandana code, also called the hanky code or flagging, is one of queer culture's most enduring inventions: a colour-coded system for non-verbally communicating sexual interests, preferences, and roles without saying a word.

It was practical. It was subversive. And it pre-dates the internet by decades.

Here's the full picture of what the colours mean, where the code came from, and how it's evolved far beyond its origins.

Contents

    What is the bandana code?


    The bandana code is a system of colour-coded handkerchiefs used to communicate sexual interests and preferred roles non-verbally. The colour of the bandana identifies a particular activity, and the pocket it's worn in, left or right, identifies the wearer's preferred role in that activity.

    The left side signals a top or dominant role. The right side signals a bottom or submissive role. Wearing the same colour on both sides, or around the neck, typically indicates versatility or openness to either role.

    The system extends beyond just the back pocket. Flagging can also involve colours in piping on leather gear, boot laces, or socks. Any colour worn deliberately on the body can carry meaning within communities that use the code.


    Where did the code come from?


    The roots are genuinely contested, which is fitting for a code that was, by design, unofficial and decentralised.

    The wearing of coloured bandanas as practical accessories was common in the mid-to-late nineteenth century among cowboys, steam railroad engineers, and miners in the Western United States. The theory connecting this to queer history holds that, after the Gold Rush, because of a shortage of women, men dancing together at square dances developed a system in which blue bandanas indicated the male role and red indicated the female role worn around the arm or hanging from a belt.

    The modern hanky code is a different beast. It's most often reported to have started in New York City around 1970, when a journalist for the Village Voice joked that instead of men simply wearing keys on one side of their belt to indicate top or bottom, coloured handkerchiefs could be used to signal more specific interests. Apparently, the community took the joke seriously.

    From there, the code spread and formalised through gay leather and fetish communities in San Francisco. Other sources attribute its expansion to marketing efforts by The Trading Post, a San Francisco erotic merchandise store, around 1971, which began promoting handkerchiefs with printed cards listing colour meanings. Alan Selby, founder of Mr S Leather, also claimed credit for the expanded code. The story goes that their bandana supplier accidentally doubled an order, and assigning meanings to the extra colours was a way to sell through the stock.

    By 1974, Scene and Machine magazine had published the code in earnest, and in 1977 Hal Fischer's book Gay Semiotics documented it photographically, depicting the meanings of colours worn in the back pockets of gay men. That work has been referenced and reissued repeatedly in the decades since.

    There were always multiple competing versions. There was no single authoritative standard. The code published in Larry Townsend's Leatherman's Handbook II in 1983 is generally considered the most authoritative reference. Still, the longer lists that circulated were more elaborate, and as Gayle Rubin noted, many of the more exotic colours were worn more for humour than serious cruising.


    How the code works


    The system has two variables: colour and placement.

    Placement

    • Left side (pocket, belt loop, upper arm) = top / dominant / giving

    • Right side = bottom / submissive / receiving

    • Both sides or around the neck = versatile/open to either

    The Core Colours and their Meanings

    These are the most widely agreed-upon colours, drawn from the codes that circulated most broadly through the 1970s–80s leather and cruising communities.
    Colour Meaning
    Dark blue Anal sex
    Light blue Oral sex
    Red Fisting
    Black BDSM / S&M
    Grey / silver Bondage
    Yellow Watersports (urine play)
    White Masturbation / mutual masturbation
    Orange Anything goes / no hard limits
    Purple / violet Piercing
    Pink Dildo play / toys
    Hot pink / fuchsia Spanking
    Green Daddy / son dynamics (varies by context)
    Brown Scat play
    Robin egg blue Mutual oral (69)

    A few caveats worth knowing: the exact shade matters, and the difference between navy and light blue, or pink and hot pink, can be meaningful. In a world with at least six different blues and six different pinks, you can't always be certain you're reading the intended colour correctly, which is why the code works best as a conversation starter rather than a definitive signal. If you're uncertain, ask.


    Beyond gay men: how the code expanded


    The bandana code started in gay male leather and cruising culture, but it didn't stay there.

    Jack Fritscher, founding editor of Drummer magazine, claimed to have published the first lesbian hanky code in 1979, written by Pat Califia and Gayle Rubin for their Samois Collective. By 1981, it had been self-published in their anthology Coming to Power, and by 1984, a version with 34 colours was in circulation. The same year, a mail-order catalogue was selling silk hankies in 18 colours specifically to women.

    Femme flagging took the concept further. Femmes in the queer community developed their own flagging system in response to femme invisibility, the experience of feminine-presenting queer women being read as straight. The nail flagging system involves painting all nails one colour and the ring fingernail a different colour for signalling. The colours roughly parallel the hanky code: grey for bondage, black for S&M, light blue for oral, and so on.

    There's also the ace ring, a plain black ring worn on the middle finger of the right hand, used within asexual communities as a low-key signal of ace identity, originally proposed on AVEN message boards and adopted since 2005.

    The common thread across all these adaptations is queer people finding ways to signal who they are and what they want in spaces where speaking plainly was either unsafe or simply unavailable to them.


    Is the bandana code still used?


    Yes, though its function has shifted.

    Social networking and dating apps have largely replaced the hanky code in cruising contexts. Online platforms allow people who have sex with men to make specific connections without the public visibility that once made the code necessary and also sometimes dangerous.

    But the code hasn't disappeared. It has undergone a revival, and while handkerchiefs themselves may be less common, hanky colours are frequently referenced in the choice of leather and fetish gear, and the code is best understood now as a conversation starter rather than a certain indication of preferences. At leather events, pride festivals, and kink spaces, bandana colours still carry meaning for those who know the language.

    There's also a cultural and aesthetic life that operates independently of function. The code is part of queer visual culture referenced in fashion, art, and queer history. It's appeared in films like Cruising and Shortbus, in TV shows including Queer as Folk and Transparent, and has inspired visual art and fashion collections that play with its colours and symbolism.


    The enby angle


    The bandana code was built on a binary top/left, bottom/right, the active/passive frameworks of a specific mid-century gay male sexual culture. That doesn't make it irrelevant to nonbinary or gender-diverse people, but it does mean there's translation work involved.

    For enbies who engage with leather, kink, or cruising culture, the colour system remains a useful reference for communicating specific interests. The colours aren't inherently gendered, even if the community that invented them was. The left/right placement system maps onto dominant/submissive or top/bottom dynamics that many nonbinary people engage with on their own terms.

    The broader point is that queer communities have always adapted the code for contexts its inventors didn't anticipate: lesbians in the 1970s, femmes who couldn't discreetly carry a bandana, asexual people who needed a different kind of signal entirely. The code is a tool, not a fixed text. What it means depends on who's using it and where.


    Frequently asked questions about the bandana code

    • They all refer to the same general system. Bandana code and hanky code are interchangeable names for the colour-and-placement system. Flagging is the broader practice of using colours, accessories, or clothing to signal sexual interests. The bandana code is one form of flagging, but flagging also includes things like nail colour, rings, and colored gear.

    • Wearing a bandana on the left side in a back pocket, on a belt loop, or on the upper arm traditionally signals a top or dominant role in whatever activity the colour represents. The right side signals the bottom or receptive. Around the neck or on both sides typically indicates versatility.

    • Black typically signals an interest in BDSM or S&M. Left side indicates a dominant/top role; right side indicates a submissive/bottom role.

    • Red is traditionally associated with fisting. As with all colours, left indicates giving and right indicates receiving.

    • The shade matters. Dark or navy blue typically signals anal sex. Light blue signals oral sex. When in doubt about shade interpretation, the code works better as a prompt to start a conversation than as a definitive statement.

    • Yes, primarily in leather, kink, and BDSM communities, and at queer events where those communities gather. Dating apps have largely lost their practical function in casual cruising contexts, but they remain culturally relevant and are frequently referenced in fashion, art, and queer spaces.

    • It originated in gay male leather culture, but early lesbian and femme communities adapted it from the late 1970s onwards. Today it's used across queer communities, including by nonbinary, trans, and bisexual people. The colour meanings are the same; how individuals apply the top/bottom framing is up to them.

    The bandana code is a piece of living queer history, practical, clever, and a product of a specific moment when the stakes of visibility were high, and the options for open communication were limited. Understanding it means understanding something real about how queer communities built their own languages, systems, and culture from the ground up, often under pressure.

    Whether you're wearing one, curious about one you've seen, or just here for the history, now you know.

    Enjoyed this read?

    Subscribe for more, or explore posts connected to this one below.

    Explore all posts
    Editor

    The Editor-in-Chief of Enby Meaning oversees the platform’s editorial vision, ensuring every piece reflects the values of authenticity, inclusivity, and lived queer experience. With a focus on elevating non-binary and gender-diverse voices, the editor leads content strategy, maintains editorial standards, and cultivates a space where identity-driven storytelling thrives. Grounded in care, clarity, and community, their role is to hold the connective tissue between story and structure—making sure each published piece resonates with purpose.

    Next
    Next

    What Does LGBTQIA Mean? Every Letter, Every Debate, No Glossing Over