AbstractDrosophila melanogastermales perform a series of courtship behaviors that, when successful, result in copulation with a female. For over a century, mutations in theyellowgene, named for its effects on pigmentation, have been known to reduce male mating success. Prior work has suggested thatyellowinfluences mating behavior through effects on wing extension, song, and/or courtship vigor. Here, we rule out these explanations, as well as effects on the nervous system more generally, and find instead that the effects ofyellowon male mating success are mediated by its effects on pigmentation of male-specific leg structures called sex combs. Loss ofyellowexpression in these modified bristles reduces their melanization, which changes their structure and causes difficulty grasping females prior to copulation. These data illustrate why the mechanical properties of anatomy, and not just neural circuitry, must be considered to fully understand the development and evolution of behavior.