Crop protection10 min read

What Light Attracts Bugs? UV, LED, Yellow and Red Light Explained

Why UV and blue light attract insects, why yellow, amber and red bulbs attract fewer, what really attracts mosquitoes and flies, and how farms use UV light traps against night-flying pests.

By Mars Vertical Farm Engineering TeamPublished

What Light Attracts Bugs? UV, LED, Yellow and Red Light Explained — illustrative image

Short answer

Ultraviolet light attracts bugs the most, followed by blue and green, because most night-flying insects have photoreceptors tuned to UV around 350–370 nm, blue and green. Black lights, mercury vapour lamps and cool-white bulbs draw the most insects; warm-white LEDs, yellow bug lights and red light draw far fewer. Mosquitoes are an exception: they are attracted mainly by carbon dioxide, body odour and heat rather than light.

What light attracts bugs the most?

Ultraviolet light attracts bugs the most, followed by blue and then green light. Most night-flying insects have photoreceptors tuned to UV (roughly 350–370 nm for UVA), blue (about 440 nm) and green (about 530 nm), so lamps rich in short wavelengths, such as black lights, mercury vapour lamps and cool-white bulbs, draw far more insects than warm yellow, amber or red light.

That single fact explains both sides of the problem. If you want fewer insects around a porch, packhouse door or farm building, choose light with little UV and blue. If you want to catch insects deliberately, as farms do with light traps and solar insect-killing lamps, use a UV or black-light source. This guide explains why insects respond to light, which pests do and do not, and how to apply that on farms and around buildings.

How do insects see light and color?

Humans see roughly 400–700 nm with red, green and blue cones. Many insects see a band shifted towards shorter wavelengths: they are sensitive to ultraviolet, which we cannot see, but generally weak in red. To a moth, a lamp emitting UV looks bright even if it looks dim or violet to us, while a deep red lamp may look almost dark.

The same spectral thinking applies to plants, which use a different band (400–700 nm photosynthetically active radiation); see PAR, PPFD and light spectrum for plants for that side. For insects, the useful summary is:

Light typeMain outputRelative insect attractionTypical use
UV black light (UVA, about 350–400 nm)Ultraviolet with some violetVery highLight traps, insect-killing lamps, bug zappers
Mercury vapour, metal halideStrong blue and some UVHighOlder street and yard lighting
Cool-white LED or fluorescent (5000–6500 K)Strong blue peak, little UVModerateWorkshops, warehouses, security lights
Incandescent and halogenMostly red and infrared, some blue, heatModerateOlder porch lights
Warm-white LED (2700–3000 K)Low blue, almost no UVLowerHomes, porches, packhouse entrances
Yellow "bug light" or amber LEDYellow and amber, no UV or blueLowDoorways, patios, outdoor seating
Red LEDRed onlyVery low for most speciesNight work lights, wildlife-friendly lighting

The ranking is a general pattern across many night-flying species; individual species, lamp brightness, height and the surrounding darkness all shift results. A bright lamp in a dark field attracts more insects than the same lamp in a lit town.

Why are flies and moths attracted to light?

For a long time the explanation was that moths navigate by the moon and get confused by nearby lamps. A 2024 study in Nature Communications by Fabian and colleagues tracked insect flight in three dimensions and found a different mechanism: flying insects tilt their backs towards the brightest part of their view, a reflex called the dorsal light response. Under the open sky this keeps them level. Near an artificial light, the same reflex makes them orbit, stall or spiral around the lamp instead of flying away.

In practice, that means insects are not "seeking" the light so much as being trapped by it once they are close. Lamps that are bright in UV and blue capture insects from a wider area because more insects notice them, and the closer the insects get, the harder it is for them to leave. This is the behaviour farm light traps rely on.

Are flies attracted to light?

House flies and most other filth flies are active by day and rest at night, so they are less drawn to outdoor lights after dark than moths are. Indoors and in daylight, though, flies do respond to UV, which is why food plants and kitchens use UV fly traps with glue boards. What attracts house flies most strongly is odour: manure, garbage, decaying organic matter and food waste. Sanitation controls flies; light traps only reduce the ones already present.

What attracts mosquitoes, if not light?

Mosquitoes are attracted mainly by carbon dioxide, body odours and heat, not by light. The Maryland Department of Agriculture describes carbon dioxide as the principal attractant: mosquitoes detect plumes of CO2 in breath from a distance and fly upwind towards it, then use skin odours such as lactic acid, vision and heat at close range to find a host.

This is why UV bug zappers are poor mosquito control. In a widely cited University of Delaware study summarised by Iowa State University Extension, suburban electric traps caught 13,789 insects over a season, but only 31 of them (0.22%) were biting flies, including mosquitoes. Nearly half were harmless non-biting aquatic insects, and more than 13% were predators and parasites that help control pests.

So, are mosquitoes attracted to bug zappers? A few are, but not in numbers that reduce bites. Traps that release CO2 or a skin-odour lure catch far more mosquitoes, and removing standing water where larvae breed does the most good. Compare options in our outdoor mosquito zapper guide and see the wider evidence in do bug zappers work.

Do LED bulbs attract bugs?

LED bulbs attract fewer bugs than mercury vapour lamps and usually fewer than incandescent bulbs, because standard white LEDs emit almost no ultraviolet. They still attract some insects, and how many depends on colour temperature. Cool-white LEDs (5000 K and above) have a strong blue peak and attract more insects than warm-white LEDs (2700–3000 K), which have less blue. Amber and yellow LEDs, with no blue at all, attract fewer still.

Two practical points follow. First, when replacing outdoor lighting around houses, packhouses or livestock barns, pick warm-white or amber LEDs, shield them so light points down, and switch them off when not needed. Second, "LED bug light" can mean two opposite products: a yellow LED bulb that attracts fewer insects, or a UV LED used inside a trap to attract more. Check the wavelength before buying.

Does red or yellow light attract bugs?

Red light attracts very few insects because most species have little or no sensitivity at long wavelengths. Yellow bug light bulbs work the same way: they cut out the UV and blue that insects see best. Neither colour makes insects disappear. A yellow bulb near a door still attracts some insects, especially if it is bright and the surroundings are dark, but usually far fewer than a white bulb in the same place.

The best approach around buildings is to combine colour with placement: mount lights away from doors and windows and aim them at the entrance rather than lighting the doorway itself, so any insects that arrive gather away from the opening.

How do UV bug light traps and insect-killing lamps work?

A bug light trap turns attraction into capture. Each design uses a UV or black-light source to draw insects in, then a different mechanism to hold or kill them:

  • Electric grid (zapper) type. A high-voltage grid around the lamp kills insects on contact. Common in plug-in and outdoor bug zappers; see the commercial bug zapper guide.
  • Vibration (frequency) type. Insects hit baffles or a vibrating screen and fall into a bag or tray, which leaves a catch you can identify and count. Our solar vibration-type black-light insect lamp works this way.
  • Suction type. A fan pulls insects that approach the light into a container, useful where a grid is not wanted, as in the waterproof solar insect suction lamp.
  • Glue board type. UV tubes behind an adhesive board, used indoors in kitchens and food plants because there is no fragment scatter.
  • Monitoring and reporting type. A trap that photographs or counts the catch and uploads data, used to time crop protection, such as the IoT insect monitoring and reporting lamp.

Solar bug lights add a panel, lithium battery and a light sensor so the lamp switches on at dusk without wiring. That is the main reason solar powered bug lights are common on farms, orchards and fish ponds far from the grid; the solar insect-killing lamp guide covers coverage and pole height, and the solar bug zapper guide covers smaller units.

Which farm pests do light traps catch, and which do they miss?

Light traps work best on positively phototactic night fliers. They are a poor fit for small sap feeders that are mostly day-active or that respond more to colour than to light.

Pest groupResponse to UV light trapsBetter primary tool
Moths (cutworms, armyworms, borers, fruit moths)StrongLight traps plus pheromone traps
Scarab, chafer and other night-flying beetlesStrongLight traps
Rice planthoppers and leafhoppersStrongLight traps with field monitoring
MosquitoesWeakSource reduction, CO2 or lure traps
House fliesModerate indoors by daySanitation, UV glue traps indoors
Fruit flies (vinegar flies)WeakVinegar or fermenting-bait traps
Fungus gnatsWeak to moderateYellow sticky cards, dry media surface
Aphids, whiteflies, thripsWeakYellow and blue sticky cards, screens, biocontrol

For small greenhouse pests, colour traps outperform light: yellow attracts aphids, whiteflies and fungus gnats and blue attracts thrips. See the yellow and blue sticky traps guide and fungus gnat control.

How do you attract and kill fruit flies and gnats?

Fruit flies follow fermentation odours, so a small container of cider vinegar or overripe fruit with a drop of dish soap, or a funnel cover, catches them better than any light. Fungus gnats breed in wet growing media; yellow sticky cards catch the adults, and letting the media surface dry out between irrigations breaks the cycle.

How should farms use insect-attracting light?

On a farm, the goal is to use light where it helps and avoid it where it hurts. A simple plan:

  1. Identify the target pest. Confirm the pest is a night flier that responds to UV, such as moths, beetles or planthoppers. If it is an aphid, whitefly or mite, choose another tool.
  2. Place traps at the crop edge or in open field blocks. Put lamps where pests enter or between blocks, not next to packhouses, homes or worker areas that should stay insect-free.
  3. Set height and spacing. Mount lamps above the crop canopy and space them by the coverage the manufacturer states, adjusting for terrain and shelter belts.
  4. Time the lamps. Use a light sensor and timer so lamps run during the main flight hours rather than all night, which reduces by-catch of non-target insects.
  5. Read the catch. Empty or check catch trays, or read IoT counts, at least weekly to see when flights start and peak.
  6. Use the data in your IPM program. Combine trap counts with field scouting to decide whether and when to treat. Our guide to integrated pest management for greenhouses and farms explains thresholds and control choices.
  7. Switch building lights to warm or amber. Reduce attraction at doors and loading bays so insects are drawn to the traps, not to the buildings.

More on lamp types and field layout is in insect light traps for farms and greenhouses.

What should you check when buying an insect light trap?

  • Light source and wavelength: UV or black light for attraction, stated in nm if possible.
  • Kill or capture method: grid, vibration, suction or glue, depending on whether you need countable catch.
  • Power: grid, or solar panel and battery with stated nights of autonomy.
  • Control: light sensor, timer and, for monitoring, IoT reporting and data access.
  • Weather rating, pole height and mounting hardware for the site.
  • Rain separation so wet insects do not short a grid or clog a tray.

How can Mars Vertical Farm help with insect light traps?

Mars Vertical Farm is a manufacturer in Shanghai with more than 20 years of experience and ISO 9001 and CE certification. We build solar black-light insect lamps in vibration, electric grid and suction designs, plus IoT monitoring and reporting lamps for farms, orchards, rice fields and fish ponds. Pole height, battery, lamp type and IoT options can be configured, MOQ starts from one set for most models, and we quote factory-direct in USD on EXW, FOB Shanghai or CIF terms. Browse the pest control equipment range.

For a recommendation and quotation, send us:

  • Crops or site type: orchard, vegetable field, rice field, greenhouse margin or fish pond.
  • Main pests you want to catch or monitor.
  • Area to cover, in hectares or acres, and whether grid power is available.
  • Whether you need catch data uploaded to a platform.
  • Quantity and delivery country.

Send us your crop, site size and target pests for a lamp layout and quotation; we answer inquiries within one business day.

Sources

Mars Vertical Farm Engineering Team

Systems engineering, Shanghai. Written by the engineers and project managers who design and ship Mars Vertical Farm systems. Ask the author

FAQ

Frequently asked questions

Can't find your answer? Our engineers reply within one business day.

Ask a question
What color light keeps bugs away?

No light color repels insects, but yellow, amber and red light attract the fewest because most insects see them poorly. Warm-white LEDs at 2700 to 3000 K are the next best choice. Combine the right color with shielding, lower brightness and placement away from doors so fewer insects gather where people enter buildings.

Are bugs attracted to blue light?

Yes. Blue is the second most attractive band after ultraviolet for many night-flying insects, because they have photoreceptors sensitive around 440 nm. This is why cool-white LEDs and fluorescent tubes with a strong blue peak attract more insects than warm-white or amber bulbs. Blue sticky cards also attract thrips during the day.

Do bug zappers kill mosquitoes?

Only a few. Mosquitoes find hosts mainly by carbon dioxide, odour and heat, so UV zappers mostly kill moths, beetles and harmless aquatic insects instead. A University of Delaware study found biting flies made up just 0.22% of the catch. Removing standing water and using carbon dioxide or lure-baited traps are more effective for mosquitoes.

What attracts house flies indoors?

House flies are drawn mainly by odours from food waste, garbage, manure and decaying organic matter, and they enter through open doors and gaps. Indoors during the day they also respond to UV, which is why commercial kitchens use UV glue-board fly traps. Sanitation, sealed bins and screens remove the cause; traps only catch flies already inside.

Do solar insect-killing lamps work on farms?

They work well against night-flying pests that respond to UV, such as many moths, beetles and rice planthoppers, especially in fields and orchards without grid power. Results depend on lamp spacing, mounting height, operating hours and local pest pressure. They do not control aphids, whiteflies or mites and should be used alongside scouting and other IPM methods.

Is UV light for houseplants likely to attract insects?

Grow lights with UV or strong blue output can attract some flying insects if they are visible from outside at night, but indoor houseplant pests such as fungus gnats, aphids and spider mites come mainly from soil, new plants and open windows rather than from the light. Keep media from staying wet and inspect new plants instead.

Equipment

Products mentioned

Get a quotation

Get advice for your project

Crop, site and rough size are enough to start. You'll hear from an engineer within one business day, Shanghai time.

  • Itemized quotation in USD with lead time
  • Layout drawings for custom systems
  • Factory inspection or video call on request
  • Export packing and shipping documents

Prefer email? inquiry@marsverticalfarm.com

Request a quotation

We reply within one business day with questions or an itemized quotation.