Head-canon: Elements are passed down from parent to child, but they aren’t a genetic trait. They’re more of a spiritual thing that’s attached to the user’s soul (hence, Morro and Cole had their powers in ghost form). Basically, it’s not something that would be picked up by a blood test.
An elemental master’s dominant eye color is influenced by their element instead of their parents’ eye colors. If/when an elemental master loses their power, their eye color reverts to the natural one determined by their genetics. As long as the element is inside of them, active or inactive, their eyes reflect their element.
Exception being Lloyd, in order to keep the identity of the Green Ninja a mystery. His powers were awakened when the Golden Weapons revealed his destiny.