Quarks, the building blocks of hadrons (baryons and mesons), exist in six different flavors, namely up (u), down (d), strange (s), charm (c), bottom (b), and top (t), along with their corresponding antiquarks. For each flavor, there exist three possible colors, designated red, blue, and green. These have nothing to do with actual visible colors but, as you will see, the way in which they combine is highly suggestive of the behavior of colored lights. The corresponding antiquarks have colors designated as anti-red, anti-green, and anti-blue. These behave, in fact, quite analogously to cyan, magenta, and yellow, respectively, the associated complementary colors in conventional optics.
Color constitutes a type of "charge" for the strong interactions responsible for nuclear forces. You can imagine that quarks of different colors attract while those with the same color repel. (This is a gross simplification since quark interactions are highly complex and depend also on spins and energies.) The theory of quark color interactions is called "quantum chromodynamics", in analogy with quantum electrodynamics.
Free quarks have never been isolated, despite years of heroic experimental efforts. This can be restated in terms of quantum chromodynamics as the proposition that only color-neutral particles can exist. A color-neutral combination of red, green, and blue quarks can be assembled into a baryon. Alternatively, the combination of a given color and its anticolor, for example red and anti-red, produces a meson. Quarks continually change colors through their interaction with gluons, the gauge particles for the strong interaction. The quark in a meson actually contains a linear combination of red, green, blue. The companion antiquark correspondingly exhibits an admixture of anticolors.
In this Demonstration, you can assemble hadrons by various combinations of the six colored quarks and antiquarks. Three quarks will produce a color-neutral baryon, which displays as white. Three antiquarks will give you a color-neutral antibaryon, which displays as black. Any combination of quarks with their antiquarks (one, two, or three pairs) produces a color-neutral meson, which displays as gray.
The additive color behavior is precisely the same as that involving red, green, blue, cyan, magenta, and yellow.