The browser you are using is not supported by this website. All versions of Internet Explorer are no longer supported, either by us or Microsoft (read more here:

Please use a modern browser to fully experience our website, such as the newest versions of Edge, Chrome, Firefox or Safari etc.


ColorMath is a Mathematica package for symbolically performing color summed calculations in SU(Nc). It is based on advanced pattern matching and uses a syntax which is very similar to how QCD color structure is written on paper.

For a quick start, it is recommended to use the Mathematica notebook ColorMathTutorial1.0.nb. However, the ColorMath paper is recommended for more details and better understanding. ColorMath has been tested with Mathematica 7, 8 and 9, but also seems to work with version 10 and 11. ColorMath is published in EPJC as well as on the Wolfram Library Archive.


The ColorMath paper, package and tutorial can be downloaded here:

Color bases

For many applications, it is desirable to use color bases for treating the color structure. Below is a selection of multiplet bases as Mathematica .m packages, which can be read in to Mathematica and used with ColorMath. The files are also fairly human readable. More information about the bases can be found by reading the top sections in the respective .m-files.

Gluon bases

Below are the orthogonal normalized multiplet color bases needed for processes with four, five and six gluons, for any Nc. They come in two versions, one charge conjugation invariant version, and one general version. The invariant bases use that in any pure gluon amplitude, the color structures related by swapping quarks and antiquarks always appear together. These bases are thus sufficient for gluon amplitudes. The larger, non-invariant, versions can be used for building bases with quarks (a gluon can be traded for a quark-antiquark pair) and for more straight forward calculations using Wigner 6j coefficients. Smaller Nc=3 versions of the bases are obtained by crossing out the vectors which do not appear for Nc=3. The bases are valid for any order in perturbation theory.

Bases with quarks

Will be added shortly... rsn

Wigner 6j coefficients

ColorMath is based on rewriting color structures into small representations, and then contracting indices to evaluate invariants. An alternative way of performing calculations in color space is to use Wigner 6j and 3j coefficients, however, only some Wigner 6j coefficients have been calculated, and ColorMath cannot (currently) perform contractions using Wigner coefficients. A set of Wigner 6j coefficients, sufficient up to six gluon amplitudes up to NLO or tree level amplitudes with up to four incoming plus four outgoing color lines is supplied below. The 3j coefficients, which correspond to vertex normalizations, are normalized to one.