What Colors Attract Flies and Which Ones Repel Them?

Blue is the single most attractive color to the widest range of pest fly species, from common house flies to stable flies and tsetse flies. But the full picture is more nuanced than a single color winner. Different flies have evolved different visual systems tuned to their ecological needs, and what draws a house fly to a trap may be irrelevant to a horsefly hunting for a blood meal. Mosquitoes, for instance, zero in on orange and red wavelengths that match human skin. The “repellent” side of the equation is equally species-dependent, though lighter colors tend to be less attractive across the board.

Why Blue Stands Out for House Flies

Experiments with house flies have consistently shown that blue targets outperform other colors. In controlled laboratory trials using both fabric and plastic targets, blue attracted more than twice the number of house flies compared to white, and roughly three times more than yellow.1Journal of Medical Entomology. Behavioral and Physiological Response of Musca domestica to Colored Visual Targets Adding black lines to a blue surface made it even more attractive, while adding yellow lines actually reduced the blue target’s appeal. A separate study using colored baits confirmed the pattern: blue bait was preferred most, detected fastest, and consumed in greater quantities than red, purple, or green alternatives.2Entomological Research. Colored bait preferences of house Fly (Musca domestica L.) (Dipetera: Muscidae)

White also performs reasonably well. In head-to-head trials it falls behind blue but consistently outperforms warmer colors like red and yellow. The practical takeaway for anyone setting up a fly trap is straightforward: a blue surface with dark contrasting lines is close to the optimal visual lure for house flies. Red, purple, and green are the weakest attractors.

The Evolutionary Logic Behind Blue Attraction in Biting Flies

For decades, researchers noticed that tsetse flies, stable flies, and other biting species are drawn to blue fabrics, particularly those with high reflectance around 460 nanometers.3PubMed Central. Visible spectral distribution of shadows explains why blue targets with a high reflectivity at 460 nm are attractive to tsetse flies The question was why. A 2023 study tackled this by modeling what a fly’s visual system actually “sees” when it looks at potential hosts and background foliage. The answer: biting flies distinguish animals from leaves using a contrast between their blue and green photoreceptors. Animals and leaves reflect light differently in those bands, and the quickest shortcut the fly brain has for identifying a host is this blue-green opponency signal. Blue objects happen to trigger that signal strongly, which is why they get misclassified as animals.4PubMed Central. Why are biting flies attracted to blue objects?

This explains a pattern seen across multiple biting fly species. For tsetse fly traps used in disease-vector control, catches go up when blue reflectance at 460 nm increases and down when reflectance shifts toward green or ultraviolet wavelengths.5PLOS Neglected Tropical Diseases. Optimizing the Colour and Fabric of Targets for the Control of the Tsetse Fly Glossina fuscipes fuscipes Blue is not just an incidental preference; it is the color that most closely mimics the visual signature of a warm-blooded animal against a leafy background.

Stable Flies Prefer It Even Darker

Stable flies, the biting pest common around livestock operations, lean even darker in their preferences. Field trials with cloth targets found that attraction followed the order black, then blue-black, then blue.6PubMed. Blue and Black Cloth Targets: Effects of Size, Shape, and Color on Stable Fly (Diptera: Muscidae) Attraction Traps made from Alsynite fiberglass, which refracts ultraviolet light, captured far more stable flies than blue-black cloth targets at most sites in a zoo study, with the fiberglass traps accounting for about 80% of all catches.7PubMed Central. Spatial distribution, seasonality and trap preference of stable fly, Stomoxys calcitrans L. (Diptera: Muscidae), adults on a 12-hectare zoological park The lesson for anyone managing stable flies around barns or outdoor areas is that very dark targets with a UV component tend to work best.

Ultraviolet Light and Indoor Fly Traps

The glowing blue tubes you see in restaurant fly zappers are not actually relying on visible blue light. The key wavelength is ultraviolet, specifically in the 310 to 370 nm range, which peaks well below what the human eye can see. Research dating back decades established that house flies have a genuine behavioral preference for UV emission over visible wavelengths.8Entomologia Experimentalis et Applicata. Intensity and spectral emission as factors affecting the efficacy of an insect electrocutor trap towards the house‐fly A lamp peaking at 340 nm attracted more than three times as many flies as a blue lamp peaking at 419 nm, and more than four times as many as a white lamp. This means the visible glow of a bug zapper is mostly a side effect; the invisible UV output is doing the real work.

Interestingly, cycling a UV trap on and off rather than leaving it constantly lit also boosts catch rates, likely because the changing light stimulus reactivates the fly’s attention.9PubMed Central. Turning Ultraviolet Light Traps On and Off Increases Their Attraction to House Flies (Diptera: Muscidae) If you are shopping for an indoor fly trap, the UV output matters far more than the apparent brightness or color of the tube to your own eyes.

Mosquitoes Prefer Orange and Red

Mosquitoes play by different rules. A widely cited 2022 study in Nature Communications tracked how Aedes aegypti mosquitoes responded to colored objects inside a wind tunnel and found that, after detecting carbon dioxide (the gas you exhale), they became strongly attracted to wavelengths humans see as cyan, orange, and red. They showed little interest in green, blue, or violet objects.10Nature Communications. The olfactory gating of visual preferences to human skin and visible spectra in mosquitoes The attraction to orange and red makes sense biologically: human skin reflects light most strongly in those wavelength bands. When the orange-red portion of the skin’s color spectrum was filtered out, attraction disappeared.

This has real implications for what you wear outdoors in mosquito territory. A field study in Mali found that light-colored clothing was least attractive to host-seeking mosquitoes overall, and that wearing white or other pale colors could reduce bite exposure.11Journal of Travel Medicine. Effect of textile colour on vector mosquito host selection: a simulated field study in Mali, West Africa Dark reds, blacks, and oranges put you closer to the visual signature mosquitoes are already primed to seek once they smell your breath.

Yellow Traps and Agricultural Pest Flies

Walk through any orchard or vegetable garden and you will see yellow sticky traps hanging from branches. These exist because several agricultural pest flies are strongly attracted to yellow. Hoverflies, which are key pollinators but also monitored as indicators of pest pressure, showed a clear preference for fully yellow traps over yellow-green or fully green ones.12Annals of Applied Biology. The role of odour and visual cues in the pan‐trap catching of hoverflies (Diptera: Syrphidae) Carrot flies respond most to light reflected in the 550 to 570 nm (green-yellow) band, while reflectance in the broader violet-to-green range actually reduces catches.13Bulletin of Entomological Research. Some factors affecting the efficiency of sticky board traps for capturing the carrot fly, Psila rosae (Diptera: Psilidae)

Even placement matters. For western cherry fruit flies, the amount of light passing through a yellow trap affected how attractive it was. Traps positioned so that ambient sunlight passed through them caught more flies than identical traps positioned with their backs to the sun.14The Canadian Entomologist. Ambient light intensity and direction determine relative attractiveness of yellow traps to Rhagoletis indifferens (Diptera: Tephritidae) If you are using yellow sticky traps in a garden, hanging them where they catch direct sunlight can make a noticeable difference.

The spotted-wing Drosophila, a major pest of soft fruit, breaks slightly from the yellow preference. Blue and green lights attracted substantially more of these flies than red light in laboratory tests, and their eyes showed stronger electrical responses to blue wavelengths as well.15Scientific Reports. Color preference of the spotted wing Drosophila, Drosophila suzukii The species you are targeting determines the color of trap you should deploy.

Horseflies, Dark Colors, and Polarized Light

Anyone who has been bitten by a horsefly while wearing a dark shirt has experienced their visual strategy firsthand. Female horseflies locate blood-meal hosts partly by detecting polarized light reflected off dark fur and skin. Dark surfaces polarize reflected light more strongly than light ones, giving the fly a reliable signal that separates a potential host from the surrounding landscape.16PubMed Central. Why do horseflies need polarization vision for host detection? Polarization helps tabanid flies to select sunlit dark host animals from the dark patches of the visual environment

The specific wavelengths involved have been teased apart in field tests with lures. Removing UV and blue components from polarized reflections made lures unattractive to horseflies, while removing the green component actually increased attractiveness.17PubMed Central. Horsefly object-directed polarotaxis is mediated by a stochastically distributed ommatidial subtype in the ventral retina In other words, horseflies use a specific subset of photoreceptors tuned to polarized blue light for host finding, and green light actually suppresses the response. This is why light-colored, loosely woven clothing offers some protection: it reflects less polarized light and looks less like an animal to a horsefly’s visual system.

How Zebra Stripes Deter Biting Flies

The striking stripes of zebras have long puzzled biologists, and one of the leading explanations is that they serve as an anti-fly defense. The evidence is surprisingly strong. In experiments where domestic horses wore coats of different patterns, striped coats received dramatically fewer horsefly landings than solid black or solid white coats, even though the flies attacked the horses’ uncoated heads at the same rate regardless of coat pattern.18PLOS ONE. Benefits of zebra stripes: Behaviour of tabanid flies around zebras and horses

Follow-up work pinned down the mechanism more precisely. As the contrast between light and dark stripes increased, landing rates on the coated portion of the horse dropped steadily, with each small increase in contrast reducing landings by roughly one percent.19PubMed Central. Why don’t horseflies land on zebras? Flies also flew faster and stayed farther away from striped and checkered surfaces compared to uniform grey ones.20PubMed Central. Zebra stripes, tabanid biting flies and the aperture effect The leading theory is that the alternating stripes disrupt the polarized-light signal that horseflies rely on for their final approach, essentially scrambling the visual “landing strip.” Researchers have referred to this as the aperture effect: the fly’s motion-detection system gets confused by the alternating edges.

This research has sparked commercial interest in striped fly sheets for horses. If you keep horses and deal with persistent horsefly problems, black-and-white striped blankets are no longer a novelty idea; they have genuine experimental support behind them.

Smell Changes How Flies Respond to Color

Color preference rarely operates in isolation. Flies integrate what they see with what they smell, and the combination can be more powerful than either cue alone. For mosquitoes, this is especially clear: without a whiff of carbon dioxide, they showed almost no interest in colored objects at all. The color preference only switches on after the right odor primes the system.10Nature Communications. The olfactory gating of visual preferences to human skin and visible spectra in mosquitoes

The same principle holds in agricultural settings. Spotted-wing Drosophila modulate their color responses depending on what they smell: the odor of blueberries was more likely to interact synergistically with color cues than yeast or other volatile compounds.21Environmental Entomology. Olfactory Cues From Host- and Non-host Plant Odor Influence the Behavioral Responses of Adult Drosophila suzukii (Diptera: Drosophilidae) to Visual Cues And for stable flies, adding a blend of livestock-associated odors to a colored trap significantly boosted catches compared to color alone.22Scientific Reports. Multimodal interactions in Stomoxys navigation reveal synergy between olfaction and vision

The practical implication is that a trap or repellent strategy relying solely on color will always underperform one that also manages odor cues. A blue trap works well, but a blue trap baited with an appropriate attractant works substantially better. Conversely, wearing light-colored clothing helps, but pairing it with a topical insect repellent that disrupts odor detection addresses both sensory channels the fly uses.

Time of Day Shifts Color Preference in Fruit Flies

One of the more surprising findings in recent years is that fruit flies do not maintain a fixed color preference throughout the day. When given a choice between blue, green, and dim light, Drosophila showed a strong preference for green in the early morning and late afternoon, a reduced green preference at midday, and consistent avoidance of blue throughout the day. This pattern depended on the fly’s internal circadian clock.23PubMed. Daytime colour preference in Drosophila depends on the circadian clock and TRP channels

This is a useful reminder that color attraction in flies is not a simple wiring diagram. It shifts with time, with odor context, with ambient lighting, and with the fly’s internal state. For anyone dealing with fruit fly infestations in a kitchen or vineyard, it suggests that trap placement and timing interact in ways most people do not consider. A trap that performs well in afternoon light might perform differently at dawn, and not just because fewer flies are active.

How Egg-Laying Flies Choose Surfaces by Color

The color preferences of flies looking for a place to lay eggs do not always match the preferences of flies looking for food or hosts. Cabbage root flies, for instance, were more attracted to substrates with higher reflectance in the blue portion of the spectrum and lower reflectance in the green, a finding that complicates the usual advice to use green mulches as a deterrent.24Entomologia Experimentalis et Applicata. The effect of colour of the substrate on the landing and oviposition behaviour of the cabbage root fly Garden advice columns sometimes suggest that surrounding brassicas with green material or reflective mulch will keep root flies away. The evidence suggests the story is more complicated: what matters is the specific spectral signature of the surface, not just its apparent color to the human eye.

This highlights a general theme across the research. Human color categories are a poor guide to what a fly sees. Two surfaces that both look “green” to you could have very different spectral profiles in the ultraviolet or in narrow visible bands, making one attractive and the other neutral. When precision matters, as in agricultural trap design or livestock fly management, spectral measurements of the actual material trump human color names every time.

Practical Color Choices for Different Situations

Because different fly species respond to different wavelengths, the best color strategy depends on what you are dealing with:

  • House flies indoors: UV-emitting traps with peak output around 340 nm are the gold standard. If you are using sticky traps, blue with black contrasting lines pulls in the most flies.
  • Stable flies around livestock: Very dark targets, ideally black or blue-black, work best. Pair with UV-reflective materials and odor attractants for maximum effect.
  • Horseflies outdoors: Wear light-colored, loosely woven clothing. For horses, striped fly sheets with high-contrast black and white patterns reduce landings. Avoid dark, tight-fitting fabrics that reflect polarized light.
  • Mosquitoes: White and other light colors reduce bite exposure. Avoid dark red, orange, and black, especially when you are also giving off CO2 (which is always, but particularly during exercise).
  • Garden pest flies: Yellow sticky traps work for hoverflies, carrot flies, and many fruit fly species. Position them where sunlight passes through the trap material rather than reflects off it.
  • Spotted-wing Drosophila: Blue or green traps outperform red. Consider pairing with host-fruit odors for synergistic attraction.

No single color works universally as a “repellent” the way citronella is marketed for mosquitoes. What exists is a spectrum of relative unattractiveness. Green, for most pest flies, falls somewhere in the middle; red is unattractive to house flies and stable flies but attractive to mosquitoes. The closest thing to a general-purpose fly-repelling color is a bright, clean white or a pale pastel. These surfaces reflect broadly across the visible spectrum without strong peaks in the blue or UV range, and they reflect less polarized light than dark surfaces, making them poor targets for horseflies. It is not that white repels flies so much as that it simply does not trigger the specific visual signatures most species are hunting for.