Today's Business section story about the new traps being produced in Spokane by the Rescue company explained how the R&D team used technology to measure bugs' retinal response to different colors. The photo here, by the SR's Dan Pelle, shows Sterling's entomologists Qing-He Zhang and Paul Bryant.
That process is called ERG, electroretinography. It's very cool, and in the Rescue lab, it's done by connecting electric wires to the tiny retinal surfaces of certain insects. By sending different wavelengths of energy to the retina, the tool measures the response.
The full spectrum of visible colors, from red to ultraviolet, is tested and the resulting responses — measured by computers — are used to plot a color pattern that that insect should be responsive to.
Here's the best overall primer on ERG, on Wikipedia.