What Is Melanin?
Melanin is a name for a group of pigments found in most organisms, including us, humans! Melanin is what makes our skin and hair appear darker or take a specific shade. We also have melanin in our eyes, but we will get to it soon.
Melanin group includes several pigments, each "responsible" for their color. Those that impact our external appearance the most are brown eumelanin, black eumelanin, and yellow and red pigment pheomelanin. Eumelanin is both the most common and the most abundant, and typically is the one "missing" in cases of albinism.
How Melanin Determines Our Appearance
You have seen the effects of the changes in melanin in human bodies many times! For example, eumelanin in the reason we get gray hair with aging. Our hair itself is more or less transparent, and it is melanins that give it color. As the body ages, it stops producing brown eumelanin but continues producing the black eumelanin; hence the hair turns grey. At an even later age, even black one can fade away, leaving hair with no color (it appears white because of the optical effects).
In human skin, the most readily observable change is tan: skin darkening after a day in the sun. Scientifically speaking, melanogenesis triggered by exposure to UV radiation. The UV radiation can be harmful, so it is a protective reaction of our skin. Melanin absorbs light very effectively and can dissipate the majority of the UV radiation. This is also the reason why people in sunny countries usually have darker skin, and people with very light, almost white skin get bad sunburns: they have less melanin to protect them.
Pheomelanin gives skin more pink, red, or orange undertones. It is concentrated in nipples and lips, and some other body parts that appear redder than others. Pheomelanin makes your lip color different from the general tone of your face — red pheomelanin mixed with some brown eumelanin results in orange hair shade. The "redheads" with ginger or red hair often have slightly more pinkish skin tone, thanks to the pheomelanin.
The "Missing" Blue And Green Pigment
The same yellow, brown, and black pigments are present in our eyes, mainly in the iris and choroid. But there is no blue or green pigment at all! Neither in your eyes nor anywhere else. Your veins on the inside of your arm might appear greenish, blue, or violet: but in reality, they are not; they only look that way because of the overlay of the yellow-ish or pinkish skin over them.
Here is the question: how come some people have those beautiful sky-blue or grass-green eyes if there is no green or blue pigment? Let's find out.
What Is An Iris?
Your iris is a thin, circular structure in the eye with the pupil in its center. It overlays the lens and is responsible for the size of the opening (pupil), determining how much light penetrates it to the lens. If you have a professional camera, you can imagine it this way: the iris plays the role of the diaphragm, where the pupil is the "aperture."
The ocular lens is transparent, so, same as our skin, our eyes need it for protection from UV and other high-frequency light. This is why iris needs its pigments.
Melanin + Optical Physics = Eye Color
The pigmented areas of the iris consist of several layers: the front fibrovascular layer known as stroma (contains pigmented elements of brown or yellow color) and, beneath the stroma, pigmented epithelial cells (mainly black). Iris' shade is a very complex phenomenon: each visible, percieved color is a result of the combined effects of pigmentation, texture, and interlacing of the tissues and blood vessels within the iris.
Pigmentation is still the most impactful factor, so if there is a lot of melanin in the eye, they would appear dark-colored. If there are no pigments at all, the iris would appear pink (the color of the blood vessels) or purplish (blood vessels plus some light scattering).
In the eyes with little melanin in the stroma, various optical phenomena produce shades of blue and green. Those processes are very complex: selective absorption and reflection by biological molecules, Rayleigh scattering, Tyndall scattering, and diffraction - to name a few.
Eyes with light yellow or amber color happen when the pigmented stromal cells contain pheomelanin with little eumelanin. If you only see yellow on the strong pupil contraction (when you stare at the bright light), it might be just the color of the contracting fibers.