Hi Natalia,
the coloring of the groups is based on kappa score (shown as edges), that takes into account shared genes between terms. Many genes have several functions, so the annotations of the terms will overlap, specially in the hierarchical structure of GO. Some of the terms share genes with terms included in other groups. This is the reason for the multiple colors. To create groups we compare initially pairs of terms. If these terms share more than 50% of genes, and their kappa is bigger than the set kappa threshold (default 0.4) they form a group. We further compare these groups until no merging is possible.
We consider then the group as a "super term", and the pvalue is calculated in the same way as for a term.
Best