Historically, a bandana placed in a back pocket indicated that the wearer was gay, or what is now called a member of the GLBTQ community. The bandana code originated in the 1970s at a time when gay men needed to be circumspect about their sexuality.
The use of the bandana code was not particularly prevalent among lesbian women. Additional information is communicated by the pocket in which the bandana is placed. The right pocket indicates one type of sexual activity preference, the left another. The bandana code is not widely used today, and many people place bandanas in their back pockets with no signal or symbolism intended.