Darwin himself was confused about one aspect of inheritance. When one parent has brown eyes and the other has blue eyes, why don't all of the children have dark blue eyes? Why don't genes mix attributes? While some of the children will have brown eyes and some blue eyes, one might have green eyes. To understand this process we have to know about dominate and recessive genes.
Gregor Mendel lived and worked at about the same time as Darwin. He worked out the basic idea of gene inheritance and published his results in 1866, just seven years after Darwin published the "Origin of Species." Mendel's work was unrecognized during his lifetime, but was rediscovered in 1900, 16 years after his death. Today he is considered the father of genetics.
Each person carries two genes--one from the mother and one from the father--for each gene location. In humans, there is a gene location called EYCL3 that can have a gene for brown eyes or a gene for blue eyes. The gene for brown eyes is preferred; if either of the locations have the gene for brown eyes, the owner of he genes will have brown eyes. Only if both of the genes in EYCL3 are blue will the owner of the genes have blue eyes.
Here is what Mendel knew that could have cleared things up for Darwin: genes work in combinations and they aren't mixed, they are selected. If two parents have one gene for brown eyes and one gene for blue eyes in location EYCL3, there is one chance in four that one of there children will have two genes for blue eyes. In other words, both parents have brown eyes, but one fourth of their children (on average) will have blue eyes.
Nature always has two choices of which gene (maternal or paternal) to use, and nature prefers to use some genes over others. For EYCL3, if the brown gene is present it will be used. The only way the blue gene will be used is if that is the only choice because both genes are the blue gene. Geneticists describe this situation by saying that the brown eyes gene is dominate and the blue eyes gene is recessive.
The actions of the genes can become really complicated when several genes work together to form a single attribute. It is a misconception to think of genes as switches that turn on and off specific attributes. This can happen with some attributes of simple organisms, but for most human traits it is not usually that simple.
In addition to EYCL3, there is an EYCL2 and an EYCL1. EYCL2 works in a similar fashion to EYCL3, except that EYCL2 can be brown, blue or green. Brown is dominate over both blue and green and green is dominant over blue. EYCL1 is more complicated. These three genes and perhaps others yet to be discovered all work together.
Eye color is caused by different agents working on the irises (colored parts) of the eye. Each one of EYCL1, EYCL2 and EYCL3 have an effect on the irises. Different combinations of these three genes can produce all of the various eye colors that humans can have.