The wings of butterflies, like the wings of flies and bees are clear. The chitin/protein composite secreted to make the wing membrane is transparent. The color of butterfly wings is due entirely to the presence of scales. Rub the scales off a butterfly wing and only the veins and clear membrane will be left.
Scales are produced by cells in the wing. Each hair cell produces only a single scale. Each scale is a single color. Butterflies produce two types of scales: Ground scales and cover scales. The cover scales are transparent. They cover the ground scales and allow light to pass. Ground scales are colored. The color may be due to a pigment or to reflection due to the way physical structure of the the scale interacts with the spectrum of light at different wavelengths.
When pigments are used to produce colors, each cell produces a single pigment, and that pigment is incorporated into the scale. The three basic pigment colors are black, yellow and red. The color patters on the butterfly wing reflect the distribution and location of the pigment producing cells. Why do we see more than three colors on some butterflies? Some of the colors may be structural and greens and blues are often produced by reflectance. However, scales are so tiny that producing different colored scales close together will be perceived as a blend of the two or more colors. Subtle differences in shades can be created by altering the density of a pigment type within and area. Each pattern that we on a butterfly wing is not solid color, but the product of tiny dots of color, too small to be seen individually, but as a whole that give the impression of solid colors and patterns similar to those seen in impressionist art.