Each egg group could have a different coloured egg, and the sprite chosen is the common egg group between the parents. If both the egg groups of the parents are shared, it'll choose the mothers first egg group.
The only exception to this rule could be Ditto, obviously.