In QED there are only two values for electric charge, positive and negative, or charge and anticharge. To explain the behaviour of quarks in QCD, by contrast, there need to be three different types of color charge, each of which can occur as color or anticolor. The three types of charge are called red, green, and blue in analogy to the primary colors of light, although there is no connection whatsoever with color in the usual sense. Color-neutral particles occur in one of two ways. Mesons, on the other hand, are built from pairs of quarks and antiquarks, and in these the anticolor of the antiquark neutralizes the color of the quark, much as positive and negative electric charges cancel each other to produce an electrically neutral object.
Quarks interact via the strong force by exchanging particles called gluons.
In contrast to QED, where the photons exchanged are electrically neutral, the gluons of QCD also carry color charges. To allow all the possible interactions between the three colors of quarks, there must be eight gluons, each of which generally carries a mixture of a color and an anticolor of a different kind. Because gluons carry color, they can interact among themselves, and this makes the behaviour of the strong force subtly different from the electromagnetic force.