As I understand it (and that's a huge caveat there), Diversity is key for these fertility and immunity genes.
If we use the picture in the OP as our example, you'll notice that immunity is at 100%, The reason is that each of the blue boxes under that stat have two different letters in them (which is good).
But if you look above that at fertility, you'll see that is only at 33%. That is because only two of the six boxes have two different letters in them (2/6, being 1/3rd, being 33%). That's the fourth box (AC) and the fifth box (AC). The other four boxes where the two letters in the box are the same (AA, AA, BB, CC) and so you don't get any percentages for them.
This is why two parents that have 0% fertility or 0% immunity can sometimes produce 100% of those stats in their children. If the mom's stats were all AA, AA, AA, but the dad's stats were all BB, BB, BB, then the kids might have AB, AB, AB, across the board, making them 100%.
So in your example, the perfect match for this animal to get their kids to 100% fertility and 100% immunity, would be a mate whose genes read:
Fertility: BB, BB, AA, BD, BD, DD,
and
Immunity: AC, BC, AB, AB, AC, AD.
This would assure that when you pull one letter from each box from the mom, and one from each box from the dad that the results would be a two separate letter combo in each of the kids boxes.
Note that this diversity principle only applies to fertility and immunity genes. (the two that show the boxes on this menu).
Size and longevity work much more simply, with the child's size and longevity coming out somewhere in the same range between the mom and dads. So it's best to just look for the highest animals you can for size and longevity.
I haven't been able to figure out any code for color variations (albino, melanistic, etc). Other than just to get a mom and dad who are the same variation and go wild from there!