Genes come in different varieties called alleles. Somatic cells contain two alleles for every gene, one from each parent of the offspring. The traits are ultimately determined by the genes inherited from its parents, or in other words, the genotype.
The most likely thing that would happen in this situation would be the moth would become more green. This would serve as a natural camouflage to hide it from predators.