The cross-section for $$ e^+ + e^- \to q + \bar{q} $$ goes by the square of the quark charge (times the number of colors). Now, the quarks can not be observed in isolation because they hadronize. However the cross-section for $$ e^+ + e^- \to \mu^+ + \mu^- $$ is identical except for going by the muon charge squared. So, a measurement of $$ R = \frac{\sigma_{e^+ + e^- \to \text{hadrons}}}{\sigma_{e^+ + e^- \to \mu + \mu^-}} $$ is a measurement of $$ \frac{\text{# of colors} \times \sum_\text{accessible flavors} q^2_\text{flavor}}{q^2_\mu} = \frac{\text{# of colors} \times \sum_\text{accessible flavors} q^2_\text{flavor}}{1} \quad .$$ The accessible flavors depend on the center of mass energy, so it is possible to observe the increases as the energy rises past successive quark masses (times 2). This figure : [![enter image description here][1]][1] shows $R$ over a range of center-of-mass energy ([Mandelstam variable][2] $s$) that covers the range from only including the "light" quarks (up, down and strange) through including all the quarks through the bottom with enough range to show the long plateau about the bottom quark threshold. The results are consistent with three colors and the usual charge assignments (up-like quarks are +2/3 and down-like quarks are -1/3) from the baryon spectrum. [1]: https://i.sstatic.net/BlIJc.png [2]: https://en.wikipedia.org/wiki/Mandelstam_variables