Color blindness is sometimes acquired, through brain or nerve damage, but it is most often inherited. Different forms of color perception difficulty are caused by different genetic anomalies. Aging or illness may also impair color vision. With almost all forms of color blindness, the impairment is in the cone cells of the retina, the light receiving membrane at the back of the eye.
Humans have two kinds of vision cells in their retinas, the rods and the cones. The rods are mostly active in conditions of low light, when we see in shades of gray, while the cones are at work in light that is bright enough to see color. There are three kinds of cones, each adapted to perceive light of short, medium or long wavelengths. They are often described as the red, green and blue receiving cones. Color blindness is usually caused by a defect in one of these sets of cones, or by the absence of certain cones.
Some people are completely colorblind. They see only shades of light and dark, as if they were watching a black and white movie. This may be caused by an inherited lack of cones, achromatopsia. People who inherit this extremely rare disorder not only see no color whatsoever, they also have trouble seeing in normal light, because that is what the cones are for, and they have none. Another rare form of total color blindness is cone monochromacy. In this disorder, the person has both rods and cones, but has inherited a tendency to have only one kind of cone. So he or she (almost always he) can see in normal light, but cannot distinguish hues.
Red-green color blindness is much more common. Probably about 99% of the people with impaired color perception have this particular defect. They are not completely blind to the difference between red and green as a rule, but their perception of the difference is impaired to a degree. Most people with red-green color blindness are males who have inherited the defect from mothers who themselves had normal color vision.
Why does color vision impairment strike males so much more often than females? Because it is a sex-linked tendency, inherited form the mother. It is the pair of sex chromosomes, of course, that determine gender. Females inherit two X chromosomes, one from their mother, and one from their father. Males inherit one X and one Y, the X from the mother and the Y from the father. They cannot inherit a Y from their mother, because she only has X's. The Y chromosome is smaller then the X. It contains fewer genes. So there is a portion of the sex chromosome pair of a fetus that is matched in a female, but not matched in a male. The genes for color perception are on the part of the chromosome that is matched in the female, but not in the male.
So for the female who carries a gene for color blindness on one of her X chromosomes, that gene will be almost always be overwhelmed by the gene for good color perception on the other X chromosome. Her vision will be normal, the defect hidden. But for the male, if he gets the gene for a defect, there is no matching area on his Y chromosome to offset it. He will show the defect.
There are many forms of color blindness, and many levels of severity. Quite a few people with a difficulty distinguishing blue from yellow (or blue from yellowish-blue, that is, green) do not even know they have it until they happen to take a test. Also, it is possible that color perception impairment is an advantage in some circumstances. People with impaired color vision may make better hunters, for instance, since the coloring of animals may help them to blend with the environment. Failing to see and be deceived by the camouflage, the hunter sees the prey. People who don't see color well may also be more attuned to the subtleties of texture and pattern.