Byers, J.A. 2006. Analysis of insect and plant colors in digital images using Java software on the Internet. Annals of the Entomological Society of America 99:865-874. pdf

Lygus hesperus male on alfalfa
Abstract-- Description of colors of insects and plants in biological research is often subjective and imprecise. A quantitative, statistical, and standardized method for describing colors by software analysis of digital images would be useful to researchers if readily available. An Internet Web page with JavaScript and Java applet was made that loads a digital image and analyzes the red, green, and blue (RGB) intensity components of the pixels in any rectangular area of relatively uniform color. A mean, standard deviation (SD), coefÞcient of variation, and percentage of each of the three color components in the area is calculated. Thus, a colored area in an image can be depicted objectively as R ± SD, G ± SD, and B ± SD, or percentages thereof, allowing mean color to be reproduced elsewhere by paint programs. For each analysis, the software uses the RGB component colors to make a bar graph with eachRGBvalue and SD. The software was used to analyze colors of ßowers and leaves of two cotton species, white and red varieties of upland, Gossypium hirsutum L., and Pima, Gossypium barbadense L. (Malvaceae); western tarnished plant bug, Lygus hesperus Knight (Heteroptera: Miridae); yellow plastic used in insect traps; and eight other insect species. Three two-dimensional (2D) color-space diagrams (hexagon, 2D-cube, and ternary percentages) are described and used to plot colors from analyses. Statistical tests are presented that compare whether two groups of color-space points in three dimensions are significantly separated. Differences in color vision are compared in humans, insects, digital cameras, and spectroradiometers.
Chemical Ecology