Handkerchief code

The handkerchief code (also known as the hanky code, the bandana code, and flagging) is a color-coded system, employed usually among the gay male casual-sex seekers or BDSM practitioners in the leather subculture in the United States, Canada, and Europe, to indicate preferred sexual fetishes, what kind of sex they are seeking, and whether they are a top/dominant or bottom/submissive. The hanky code was widely used in the 1970s by gay and bisexual men, and grew from there to include all genders and orientations.

Today, wearing color-coded handkerchiefs (bandanas), usually in the back pocket or around the belt loop, is the manner in which communication of desires and fetishes is achieved. Wearing a handkerchief on the left side of the body typically indicates one is a “top” (one considered active in the practice of the fetish indicated by the color of the handkerchief), while wearing it on the right side of the body would indicate one is a “bottom” (one considered passive in the practice of the fetish indicated by the color of the handkerchief). This left-right reality is taken from the earlier practice of tops wearing their keys on the left belt loop and bottoms on the right to indicate being a member of the leather subculture. In the past bandanas might be worn tied around the neck (with the knot positioned on either the left or right side); around the ankle (when wearing boots or when undressed); or on other parts of the body.

There is no universally understood color code, and regional codes vary widely. There is general agreement upon the colors for more common practices, particularly those with an intuitive relation between the color and the practice, such as yellow for urolagnia; brown for coprophilia; and black for SM, but no absolute consensus for less common practices.


This table is drawn from Larry Townsend’s The Leatherman’s Handbook II (i.e., the second edition of the book in 1983, the first edition of which came out in 1972 and did not include this list), and is generally considered authoritative. Implicit in this list of hanky color codes is the concept of right/left polarity, left as usual indicating the top, dominant, or active partner, right the bottom, submissive, or passive partner—this can, however, be ambiguous for some acts. Purple, the code for piercing, merely indicates an interest in piercing (usually that the wearer has body piercings), not necessarily that they wish to incorporate piercing into sexual play.

Color Meaning
     Black S&M
     Blue (Dark) Anal sex
     Blue (Light) Oral sex
     Brown Scat
     Green Hustler/prostitution
     Grey Bondage
     Orange Anything, anywhere, anytime (but not necessarily anyone)
     Purple Into piercing
     Red Fisting
     Pink Dildo/anal toys
     White Masturbation
     Yellow Watersports

The long, elaborate lists found on the web are more imaginative and the many color codes in them are less often used in practice, although most of the colors in longer lists are offered as bandanas for sale at almost all LGBT leather stores along with free color code cards listing their meanings.