The story
From a loose analogy to the set of primary colors. The charge property has nothing to do with visible color.
Etymology from Wiktionary, CC BY-SA 4.0.
Today it means: In the Standard Model of particle physics, a property possessed by quarks, antiquarks, and gluons that determine rules for how these particles may interact. There are three pairs of colors and anticolors: red, green, blue, and their corresponding anti-colors (e.g. anti-red). Full definition →
From a loose analogy to the set of primary colors. The charge property has nothing to do with visible color.
Etymology from Wiktionary, CC BY-SA 4.0.