Open Access
How to translate text using browser tools
1 June 2011 A New Method for Quantifying Color of Insects
Matthew S. Lehnert, Murat O. Balaban, Thomas C. Emmel
Author Affiliations +

We describe a method to quantify color in complex patterns on insects, using a combination of standardized illumination and image analysis techniques. Two color comparisons were investigated: (1) the percentage of blue in the submarginal band of the hindwing in yellow and dark morph females of Papilio glaucus L., and (2) the percentage of orange hues in the wings of 2 putative subspecies of Eastern Tiger Swallowtail, P. g. glaucus L. and P. g. maynardi Gauthier. Live specimens were photographed in a light-box with standardized lighting and a color standard. Digital images were processed in LensEye® software to determine the percentage of selected colors. No significant differences were found in the percentage of blue between yellow and dark morph females, but the percentage of orange hues between P. g. glaucus and P. g. maynardi differed significantly. Color quantification can be a useful tool in studies that require color analysis.

Color and color patterns have been used to study a wide range of ecological and evolutionary topics, including sexual selection (Punzalan et al. 2008), aposematism (Brower 1958), industrial melanism (Kettlewell 1961), and mimicry (Jiggins et al. 2001; Saito 2002). Color is used in the classification of organisms to verify species and population properties, and subspecies (Brower 1959). The color of butterfly life stages and wings is used to understand evolutionary-developmental patterns and phenotypic plasticity (Starnecker & Hazel 1999; Nice & Fordyce 2006; Otaki 2008). However, most of these studies are hindered in their ability to quantify color.

When reporting quantified colors, RGB (red, green, blue) and L*, a*, and b* values (L* = lightness, scale: 0–100; a* = green to red, scale: -120–120; and b* values = blue to yellow, scale: -120–120) are typically used. RGB are digitally represented by 256 values each, meaning a total of more than 16 million possible color combinations (Balaban 2008), but the colors produced by these values are typically non-uniform and do not correlate well to human vision (Pedreschi et al. 2006). However, L*, a*, and b* values are combined together to represent a color that can be used in a comparative context to other similar colors (Pedreschi et al. 2006), and do account for the way humans perceive color.

Existing methods for quantifying color include simple visual estimates, with or without the use of a book of color standards for reference such as Munsell's (1976), spectrophotometry (Stevens et al. 2007), color software with RGB applications (Villafuerte & Negro 1998), and colorimetery (Yagiz et al. 2009). Human vision is color biased (Wyszecki & Stiles 1982); factors such as lighting condition, illumination, and color are context-dependent (Endler 1990; Zuk & Decruyenaere 1994), and make color difficult to quantify. Specimens need to be nearly homogenous in color and have an almost flat surface to be accurately represented with colorimetry (Balaban 2008; Yagiz et al. 2009), and common image software such as Adobe Photoshop® has limitations when standardizing or calibrating a digital image and when quantifying the color patterns of complex images with large color variation.

Our objective was to introduce the use of image analysis with the LensEye® software as a tool to quantify the color of insects. LensEye® software was developed specifically for color quantification purposes, which makes it more user-friendly than other general color analysis programs such as Adobe Photoshop®. LensEye® has been used in food and agricultural sciences (Balaban 2008; Yagiz et al. 2009), but its application to entomological studies is novel. To illustrate this process, the wing colors of male and female Eastern Tiger Swallowtail butterflies, Papilio glaucus L., were analyzed in 2 comparisons: (1) the percentage of blue on the hindwing between yellow and dark morph females of P. glaucus, and (2) the percentage of orange hues between males of the 2 subspecies P. g. glaucus L. and P. g. maynardi Gauthier. In the first comparison, we predicted that the percentage of blue on the hindwing would be similar in yellow and dark morph females, because to our knowledge no previous reports have suggested a larger amount of blue in either morph. In the second comparison, we expected that males of P. g. maynardi would have a significantly larger percentage of the wings represented by high a* and b* values when compared with P. g. glaucus, as a combination of these values (reds and yellows) likely produces the orange hues that are diagnostic for this subspecies. To our knowledge, this is the first report of color quantification of tiger swallowtail butterflies.


Study Species and Specimen Preparation

The Eastern Tiger Swallowtail, Papilio glaucus L. (Lepidoptera: Papilionidae), is a large multi-colored butterfly found throughout the eastern half of the USA (Scriber 1996). Females are polymorphic and are either yellow with black stripes or melanic (Clarke & Sheppard 1962; Scriber 1996; Scriber et al. 1996); both forms have blue scales along the submarginal region of the dorsal side of the hindwings. Currently, 2 putative subspecies are recognized, P. g. glaucus and P. g. maynardi; the latter has a unique orange background color rather than the yellow found on the glaucus subspecies (Maynard 1891; Scriber 1986). Papilio g. maynardi is primarily found in Florida, but occasionally is found in other south-eastern states (Maynard 1891; Brower 1959; Scriber 1986; Lindroth 1991). Ten yellow females and 10 dark morph females of P. glaucus were captured from Cedar Key and Lake Placid, Florida to compare the percentage of blue in the hindwings between these morphs. To compare the percentage of orange hues between the 2 subspecies, 10 males were collected from La Fayette, Georgia, and 10 males from Lake Placid, Florida, to represent the P. g. glaucus and P. g. maynardi subspecies, respectively. All specimens were captured during Apr–Jun, 2008, representing what is likely the spring brood of P. glaucus in these regions.

All butterflies were captured with a butterfly net and placed into glassine envelopes for transport. The live adults of P. glaucus were cooled in a walk-in refrigerator at 4°C, removed from the glassine envelopes, and their wings spread at 4°C on white Styrofoam® to expose the dorsal side of the wings, positioned as if prepared for a professional insect collection. Spreading was facilitated with insect pins placed near the costal and A1 veins of the forewing and the anal vein and distal portion of M3 vein of the hindwing proximal to the tail. No pins were inserted into the body. Once a butterfly was spread, it was removed from the walk-in refrigerator and walked to the equipment for color analysis.

Protocol for Color Analysis

Each butterfly was placed individually in a light-box with D65 standardized lighting (Luzuriaga et al. 1997), and a Labsphere® (North Sutton, NH) yellow color standard was placed next to the butterfly. Inside the light-box, a Nikon D200 digital camera was fastened to a stand approximately 0.3 m tall so that the camera faced down, and was fixed at a specific height and connected to a computer by a USB cable (camera specifications listed in Table 1). The light-box door was closed and a photograph was taken of the butterfly. Once in the light-box, it took less than 30 sec to process an individual butterfly. The computer used Camera Control-Pro® software (Nikon, Tokyo, Japan) to control the act of taking a photograph with the camera; therefore, a photograph could be taken from the computer while the camera was enclosed within the light-box, and the picture would upload onto the computer. Two types of software were used for color analysis: Adobe Photoshop 6.0® (Adobe Systems Inc, San Jose, California) used for image adjustments, modifications, and edits, and LensEye® (Engineering and CyberSolutions, Gainesville, Florida), used for color quantification and analysis).




The digital photographs (JPEG) (Fig. 1a) were cleaned in Adobe Photoshop 6.0® to isolate the images necessary for color analysis. The “eraser” tool was used to remove insect pins, feces, and additional artifacts created during photographing. The image of the Labsphere® color standard was cleaned by selecting the “elliptical marquee” tool that was used to highlight a yellow circular area within the color standard, which was moved with the “move” tool to the left of the butterfly, and the remainder of the color standard was erased. This process created 2 final images: a butterfly and a yellow circle. The image resolution was adjusted to 700 pixels wide by selecting “Image” in the main toolbar, then “resize” and “image size”, and saved as a 24 bit BMP image (Fig. 1b). Females of P. glaucus were cleaned with the use of the “eraser” tool until only one hindwing remained. Males of P. g. glaucus and P. g. maynardi were cleaned so the entire butterfly (minus antennae) remained.

Cleaned images were opened and analyzed in LensEye® software. In Lenseye®, the objects of interest were separated from the background by designating the background color to consist of any pixel with RGB colors between 220 and 255, and the “16 colors per axis (4096 color blocks)” option was selected. This color information was displayed as the “% of total object area.” Objects smaller than a user-selected threshold of 100 pixels were ignored, ensuring only the butterfly and color standard would be analyzed. In the color calibration option, the L*, a*, and b* values of the color standard were entered (L*, a*, and b* value of 90.17, -3.27, and 74.30, respectively), and the image was calibrated by selecting the “Process Image” tab. The software then calculated the average L*, a*, and b* values of the color standard from the uncalibrated image, and adjusted the color of each pixel in the image so that the average color of the standard in the image would equal that of the given reference values; this process calibrated all objects in the image (Fig. 1c). A spreadsheet was produced listing the percentage of each color (color ID#) and the average and standard deviation of the L*, a*, and b* values based on each pixel in the object. Each color ID # has a unique L*, a*, and b* value (Table 2), and the information for each color was provided in the “color block information” in the software.




Fig. 1.

Example of sequential images produced during color analysis. The raw image of the butterfly and color standard (a) is saved as a JPEG and opened in Adobe Photoshop® where it is cleaned and saved as a bitmap image 700 pixels wide (b). The cleaned image is opened in Lenseye® and calibrated and the colors quantified (c).


Both comparisons required the use of the “color contours” option in LensEye® software. For the first comparison, the most abundant colors of blue (color ID #) were selected from the spreadsheet and the L*, a*, and b* values of these colors were searched for in the “color block information” option. To analyze the calibrated image, it had to be reopened and reprocessed in LensEye®. The “show contours” option was selected revealing a table with options for selecting thresholds, where the blue L*, a*, and b* values were entered. On the image, the L*, a*, and b* contour settings were manipulated by interactively adjusting them and evaluating the quantity of blue pixels that were highlighted in the image to find the range of blue color values that encompassed the entire blue area on the butterfly. After 2 images of both yellow and dark morph females were manipulated, the following settings were deemed best suited for the task: L* contour greater than 20, a* contour less than 19, b* contour less than 25. These threshold values were entered for each of the 20 images and the software selected all the pixels that met the above criteria (all blue areas were highlighted in red, Fig. 2A). The percentages of blue colors of the total wing area were recorded for each image by selecting the “report contour” option.

For the second comparison, we used a male of P. g. maynardi from Lake Placid, Florida, to determine color composition to represent the maynardi subspecies. The image of this male was calibrated to receive the spreadsheet with the color ID # information, and the color moderate-orange-yellow (L*, a*, and b* values equal to 70, 9, and 60, respectively) was chosen to represent the threshold to distinguish P. g. maynardi from P. g. glaucus. This color was chosen because it was the lightest orange hue represented by the specimen in the image, and we also wanted to include darker hues of orange in our analysis, as these colors also may be present on the wings of P. g. maynardi. Calibrated images of the males were reopened in LensEye® and reprocessed. The “show contours” option was selected and the L*, a*, and b* contour values were entered into the threshold space. All values greater than the chosen threshold values were highlighted, because these values (higher a* and b* values) would represent darker orange colors in the butterfly wings than the moderate-orange-yellow color (Fig. 2B). The “report contour” option was chosen to record the percentage of wing area highlighted.

Statistical Analysis

We used a Welch's t test (two-tailed; P = 0.05) to evaluate differences in the percentage of blue between yellow and dark morph females, and the percentage of orange on the wings of males of the 2 subspecies.

Fig. 2.

Example of images used to determine the percentage of blue on hindwings of females of P. glaucas (A), and to study color differences between subspecies of P. glaucus (B), with designated L*, a*, and b* color values. In image A, the dark morph female (a) has more blue extending proximally from the submarginal band compared with the yellow morph female (b). The regions of blue interpreted by Lenseye® using specified values are highlighted in red by the software. The percentage of blue in image (a) and (b) is 21.4% and 12.8%, respectively. In image B, the same threshold for colors with a higher L*, a*, and b* value than moderate-orange-yellow were used for all males of P. glaucus. Papilio g. glaucus (a) has less orange than P. g. maynardi (b), as indicated by the red. Image (a) and (b) have 5.0% and 20.6% of the wings at or above the designated threshold. Both sets of images (A and B) display the calibrated image on the left and the analyzed image on the right.



The dark morph and yellow females did not differ significantly in the percentage of blue on the hindwing (mean ± SE) (16.98 percent ± 3.10 and 14.2 percent ± 1.4, respectively) (t = 1.5858; df = 18; P = 0.1411). However, the pattern of blue differed between the morphs (Fig. 2A). All yellow females had blue scales restricted to the submarginal area of the hindwing, resulting in less than 20% of blue color on the hindwing, which was similar to some dark females, but other dark females had blue that continued proximally and became more random and scattered, resulting in a larger variation of blue color in these morphs. Four of the dark morph females had over 20% of blue scales on the hindwing, synonymous with the scattered blue scale phenotype, but the large variation in this morph led to an average quantity of blue not significantly different from that of the yellow morph.

Males of Papilio glaucus maynardi from Lake Placid, Florida, had significantly more orange than the butterflies from La Fayette, Georgia (9.97 percent ± 2.18 and 0.52 percent ± 0.90, respectively) (t = 4.007; df = 18; P = 0.0021), 80% of the analyzed P. glaucus from La Fayette had 0% of the wings at or above the designated L*, a*, and b* threshold used to represent moderate-orange-yellow. Although P. g. maynardi from Lake Placid, Florida, was visually distinct from the northern subspecies, the range of orange hues on the wings would have been difficult to quantify without a computer vision system and image analysis software. Lenseye® highlighted only the areas of the wings we were interested in analyzing. Even small patches of blue in the hindwing were highlighted, verifying the software's sensitivity to interpreting specified colors in an intricate color pattern.


The application of image analysis software and our methods open a new avenue for quantifying color that could influence understanding of color components in ecological and evolutionary systems. For instance, color associated with the effects of temperature or host plant (phenotypic plasticity) (Price 2006), range distributions of hybrid zones (Blum 2002; Gay et al. 2008), floral color changes in response to insect pollination (Paige & Whitham 1985), and seasonal polyphenisms (Hazel 2002) can be quantified. This study also provides a means to analyze color of live specimens, which could have important implications to studies of endangered species. In this study, the butterflies seemed unaffected by the method, and were capable of flight, copulation, and oviposition after the study, verified by additional studies (M.S.L., unpublished data). Our methods also provide a protocol to quantify museum specimens, for instance, in studying how color dynamics of populations have shifted over time.

Our method allows the use of thresholds to study colors of interest and to determine their percentage compared with the rest of the image. For example, the blue scales scattered over the hindwing of a dark morph female were quantified, even though these small blue spots were on a black background. Additionally, similar, but different, colors (yellow-orange) were quantified to distinguish 2 entities. Papilio glaucus maynardi is relatively unstudied, and there are conflicting reports concerning its distribution (Forbes 1960; Harris 1972; Howe 1975; Mather & Mather 1985; Scriber 1986; Lindroth et al. 1988). Our method could provide a means to determine its distribution. Other aspects of its evolutionary history could be addressed, such as determining if the subspecies represent a color cline or a rapid shift in color, suggesting similar dynamics of a narrow hybrid zone where one phenotype rapidly shifts to the other.

The primary limitation of our method, and other color quantification methods, is that standardized lighting is necessary; therefore, these methods would not be reliable in all situations, such as comparing the color of butterfly wings from photographs taken outdoors under different lighting conditions. We addressed this issue by using a light-box with standardized lighting. Other source and processing errors may have occurred, such as instrumental inaccuracies of the light-box, camera, and software; however, to minimize these errors we used the same camera and light specifications for each individual. In addition, there may be a source error in that populations of P. glaucus may experience a seasonal polyphenism, which could alter our interpretations of the data sets. We addressed this issue by collecting the individuals from the various locations during a similar time period.


We thank Jonathan Doyle and Matthew Standridge (both at McGuire Center for Lepidoptera and Biodiversity, University of Florida, Gainesville) for technical assistance in cleaning up photographs for analysis and for testing the protocol, and Alberto De Azeredo (Food Science and Human Nutrition Department, University of Florida, Gainesville) for camera, software, and photograph assistance. Jonathan Doyle assisted in collecting the P. glaucus. We thank Peter Adler (Department of Entomology, Soils, and Plant Sciences, Clemson University, Clemson), and Richard Lehnert, and 3 anonymous reviewers for editorial comments on the manuscript.



M. O. Balaban 2008. Quantifying nonhomogeneous colors in agricultural materials. Part 1: Method development. J. Food Sci. 1–6. Google Scholar


M. J. Blum 2002. Rapid movement of a Heliconius hybrid zone: evidence for phase III of Wright's shifting balance theory? Evolution 56: 1992–1998. Google Scholar


J. V. Z. Brower 1958. Experimental studies of mimicry in some North American butterflies. Part 1. The monarch, Danaus plexippus, and viceroy, Limenitis archippus archippus. Evolution 12: 32–47. Google Scholar


L. P. Brower 1959. Speciation in butterflies of the Papilio glaucas group. I. Morphological relationships and hybridization. Evolution 13: 40–63. Google Scholar


C. A. Clarke , and P. M. Sheppard 1962. The genetics of the mimetic butterfly Papilio glaucus. Ecology 43: 159–161. Google Scholar


J. A. Endler 1990. On the measurement and classification of color in studies of animal color patterns. Biol. J. Linn. Soc. 41: 315–352. Google Scholar


W. T. M. Forbes 1960. Lepidoptera of New York and Neighboring States Part IV. Agaristidae through Nymphalidae. Cornell Univ. Agric. Exp. St. Mem. 371: 1–188. Google Scholar


L. Gay , P. A. Crochet , D. A. Bell , and Lenormand T . 2008. Comparing clines on molecular and phenotypic traits in hybrid zones: a window on tension zone models. Evolution 62: 2789–2806. Google Scholar


L. Harris 1972. Butterflies of Georgia. University of Oklahoma Press, Oklahoma. Google Scholar


W. N. Hazel 2002. The environmental and genetic control of seasonal polyphenism in larval color and its adaptive significance in a swallowtail butterfly. Evolution 56: 342–348. Google Scholar


W. H. Howe 1975. The Butterflies of North America. Doubleday, Garden City, New York. Google Scholar


C. D. Jiggins , R. E. Naisbit , R. L. Coe , and J. Mallet 2001. Reproductive isolation caused by colour pattern mimicry. Nature 411: 302–305. Google Scholar


H. B. D. Kettlewell 1961. The phenomenon of industrial melanism in Lepidoptera. Annu. Rev. Entomol. 6: 245–262. Google Scholar


R. L. Lindroth 1991. Biochemical ecology of Aspen-Lepidoptera interactions. J. Kansas Entomol. Soc. 64: 372–380. Google Scholar


R. L. Lindroth , J. M. Scriber , and M. T. S. Hsia 1988. Effects of quaking aspen compounds catechol, salicin and isoniazied on two subspecies of tiger swallowtails. American Midl. Nat. 119: 1–6. Google Scholar


D. Luzuriaga , M. O. Balaban , and S. Yeralan 1997. Analysis of visual quality attributes of white shrimp by machine vision. J. Food Sci. 62: 1–7. Google Scholar


B. Mather , and K. Mather 1985. The butterflies of Mississippi: Supplement No. 3. J. Lepid. Soc. 39: 134–138. Google Scholar


C. J. Maynard 1891. A Manual of North American Butterflies. De Wolfe, Fiske & Co., Boston. Google Scholar


Munsell (Color Company). 1976. Munsell Book of Color, Glossy Finish Collection. Munsell/Macbeth/Kollmorgan Corporation, Baltimore. Google Scholar


C. Nice , and J. A. Fordyce 2006. How caterpillar avoid overheating: behavioral and phenotypic plasticity of pipevine swallowtail larvae. Oecologia 146: 541–548 Google Scholar


J. M. Otaki 2008. Phenotypic plasticity of wing color patterns revealed by temperature and chemical applications in a nymphalid butterfly Vanessa indica. J. Therm. Biol. 33: 128–139. Google Scholar


K. N. Paige , and T. G. Whitham 1985. Individual and population shifts in flower color by Scarlet Gilia: A mechanism for pollinator tracking. Science 227: 315–317. Google Scholar


F. Pedreschi , J. Leon , D. Mery , and P. Moyano 2006. Development of a computer vision system to measure the color of potato chips. Food Res. Intl. 39: 1092–1098. Google Scholar


T. D. Price 2006. Phenotypic plasticity, sexual selection and the evolution of colour patterns. J. Exp. Biol. 209: 2368–2376. Google Scholar


D. Punzalan , F. H. Rodd , and L. Rowe 2008. Sexual selection mediated by the thermoregulatory effects of male colour pattern in the ambush bug Phymata americana. Proc. Biol. Sci. 275: 483–492. Google Scholar


A. Saito 2002. Mimicry in butterflies: Microscopic structure. Forma 17: 133–139. Google Scholar


J. M. Scriber 1986. Origins of the regional feeding abilities in the tiger swallowtail butterfly: ecological monophagy and the Papilio glaucas australis subspecies in Florida. Oecologia 71: 94–103. Google Scholar


J. M. Scriber 1996. Tiger tales: Natural history of native North American swallowtails. American Entomol. 42: 19–32. Google Scholar


J. M. Scriber , R. H. Hagen , and R. C. Lederhouse 1996. Genetics of mimicry in the tiger swallowtail butterflies, Papilio glaucas and P. canadensis (Lepidoptera, Papilionidae). Evolution 50: 222–236. Google Scholar


G. Starnecker , and W. Hazel 1999. Convergent evolution of neuroendocrine control of phenotypic plasticity in pupal colour in butterflies. Proc. R. Soc. London 266: 2409–2412. Google Scholar


M. Stevens , C. A. Parraga , I. C. Cuthill , J. C. Partridge , and T. S. Troscianko 2007. Using digital photography to study animal coloration. Biol. J. Linn. Soc. 90: 211–237. Google Scholar


R. Villafuerte , and J. J. Negro 1998. Digital imaging for colour measurement in ecological research. Ecol. Lett. 1: 151–154. Google Scholar


G. Wyszecki , and W. Stiles 1982. Color Science: Concepts and Methods, Quantitative Data and Formulae (2nd ed.). Wiley, New York. Google Scholar


Y. Yagiz , M. O. Balaban , H. G. Kristinsson , B. A. Welt , and M. R. Marshall 2009. Comparison of Minolta colorimeter and machine vision system in measuring colour of irradiated Atlantic salmon. J. Sci. Food Agric. 89: 728–730. Google Scholar


M. Zuk , and J. G. Decruyenaere 1994. Measuring individual variation in colour: a comparison of two techniques. Biol. J. Linn. Soc. 53: 165–173. Google Scholar
Matthew S. Lehnert, Murat O. Balaban, and Thomas C. Emmel "A New Method for Quantifying Color of Insects," Florida Entomologist 94(2), 201-207, (1 June 2011).
Published: 1 June 2011
butterfly comparison
color analysis
color quantification
digital image
Papilio glaucus
Back to Top