Eye color is inherited by genes from our parents. Also take into consideration that variations in eye color are also due to amount and type of pigment in the iris of the eye. A common misconception is that if a baby is born to a mother with blue eyes and a father with brown eyes then the eye color will be a mixture between the two. This is not true.
There are three genes that are known to be involved in eye color. They generally explain patterns of eye color inheritance. I have posted a link below that explains the possible variations of eye color based on alleles of parents. Eye color determination is really quite complicated.
through genes ......as it happens in mendels law of inheritance