The pupil has no color
The pupil is a hole. Light goes in and gets absorbed inside the eye, so it looks black. The red eye in flash photos is light bouncing back off the blood-rich retina. Eye color is the iris, the ring around the hole.
ACGT Gene Lab
Three real DNA letters, exact inheritance math and an iris that changes in front of you. Pick two people, see the chances for their child's eyes, then edit the DNA and watch what happens.
Choose their eye colors, or switch to DNA mode if you know their genotype.
Each iris shows a typical eye in that group. Percentages include the effect of other genes, so even the same DNA can give slightly different eyes.
Every person has two copies of each DNA letter and passes one of them on, at random, 50/50.
This is one possible child of the two people above (their most likely DNA). Click a letter to swap it, like a lab experiment, and see the iris respond.
Chromosomes and copies. DNA is packed into 23 pairs of chromosomes: one set from each parent. So every letter below comes in two copies, one from mum and one from dad. Each letter here is a single-letter difference between people (a SNP).
HERC2 on chromosome 15: the on/off switch. This letter is not in a pigment gene itself. It sits next to OCA2 and works like a light switch for it. A keeps the switch ON, so OCA2 is busy in the iris and makes melanin. G turns it OFF, so the iris makes very little melanin and looks blue.
OCA2 on chromosome 15: the pigment pump. OCA2 helps the pigment factories (melanosomes) make melanin. C gives the normal protein. T gives a weaker one, so less melanin is made. It matters most when the HERC2 switch is half on (A/G): that is one route to green and hazel.
SLC24A4 on chromosome 14: a small helper. It moves ions in pigment cells. T is linked to slightly lighter eyes and hair. One letter alone changes little, but small helpers add up.
Why one letter changes the color. These letters only change how much melanin the front of the iris gets. The color itself comes from physics: little melanin lets scattered blue light out, more melanin absorbs it and the eye turns green, hazel or brown. See it in the physics simulator.
Rare variants beat the switches. In albinism, both copies of the TYR gene don’t work, so no melanin can be made at all, whatever HERC2 and OCA2 say. Heterochromia happens when only some pigment cells carry a different instruction.
DNA from other species, or no species at all. Clearly labelled, so you always know what is real.
Light brown
60 / 100 melanin score
Real life: nobody can change a person's eye color by editing DNA after birth, and editing the genes of human embryos is banned or strictly limited in most countries. This editor is a model to learn how the genes work.
Every human eye uses the same two ingredients: brown-black melanin and a little yellowish pigment. Amount, position and light scattering do the rest.
White light goes in, some of it comes back out. The color is whatever comes back. Move the sliders and watch 36 wavelengths of light travel through a slice of iris.
Light that comes back
What just changed, and why
Move a slider or pick a real eye, and this box explains what the light did.
The pupil is a hole. Light goes in and gets absorbed inside the eye, so it looks black. The red eye in flash photos is light bouncing back off the blood-rich retina. Eye color is the iris, the ring around the hole.
Melanin absorbs every color, but more blue than red: in measurements on melanin granules, absorption grows about as λ−3.5, so blue (450 nm) is absorbed about 3.6× more than red (650 nm). What survives is warm. More melanin means brown, then almost black.
The stroma is a clear layer full of tiny collagen fibers, much smaller than a light wave. These scatter short wavelengths more, as 1/λ4: blue bounces back about 4.4× more than red. Red goes deeper and is swallowed by the black back layer. Same physics as a blue sky in front of black space.
Scientists don't fully know yet. The leading idea: larger collagen deposits, about as big as a light wave, scatter all colors almost equally (Mie scattering). The exponent drops from 4 towards 0, so no color wins and blue turns grey or silver.
Green is blue scattering plus a yellow pigment (lipochrome) that absorbs some of the blue, plus a little melanin. Hazel has more melanin near the pupil and less at the edge, so one eye shows two colors.
A thicker stroma has more fibers to scatter and more pigment along the light path, so the color is stronger. A thin one lets more light reach the black back layer, so the eye looks darker or duller. Thin spots called crypts show as dark dots.
Eye doctors confirm that eye color can look different when the pupil widens. A common explanation: the same iris tissue is squeezed into a smaller ring, so pigment and fibers bunch up and the color gets stronger. Lighting, clothes and makeup change what reaches your eye too. The DNA stays the same.
Hemoglobin absorbs violet (415 nm) and green-yellow (542, 577 nm) and lets red through. Normally melanin and the black back layer hide this. In albinism the back layer has no pigment, so red light from inside the eye shines through: violet, pink or red eyes.
Some people have a ring of another color, a slice of another color, or two different eyes. It is the same physics as above: one part of the iris simply has more or less melanin than the rest. Pick two colors and see all three types.
Why: the zone around the pupil holds more (or less) melanin than the outer zone. The two zones are divided by the collarette, the wavy ring you can see in every iris, and they develop a little differently. Usually in both eyes, present from childhood and harmless. Often called hazel.
Why: in the embryo, pigment cells migrate into the iris and multiply. If one group of cells carries a small genetic difference (mosaicism), its descendants fill one area with more or less melanin. The patch is often shaped like a pie slice, but it can be any size. A small dark spot can also be an iris freckle (nevus).
Why: the whole iris of one eye makes a different amount of melanin. Most cases are inborn and harmless. Some come from a syndrome or a nerve problem, and a few appear later in life (see the table below).
Bars are a rough ranking, not exact numbers. Only complete heterochromia has a good count: a study of photos of over 11,000 people found clearly different eyes in about 0.06%.
| Cause | Born with it or later | What happens to the color |
|---|---|---|
| Benign genetic variation or mosaicism | Born | Any type. The most common reason, no disease behind it. |
| Congenital Horner syndrome | Born | The nerve signal that tells iris cells to make pigment is missing on one side, so that eye stays lighter and its pupil is smaller. |
| Waardenburg syndrome, piebaldism | Born | Pigment cells don’t reach the whole iris: one eye or a sector becomes pale blue. Waardenburg can also cause hearing loss. |
| Sturge–Weber syndrome | Born | Extra blood vessels and pigment: the affected eye is often darker. |
| Glaucoma eye drops (latanoprost and similar) | Later | Stimulate melanin production: a light eye slowly turns browner. Reported in up to a third of people using them for 5 years or more. |
| Inflammation (e.g. Fuchs uveitis) | Later | Damages the front layer of the iris: the eye becomes lighter. |
| Injury, bleeding or iron splinter (siderosis) | Later | Blood or iron deposits stain the iris darker, rusty brown. |
| Iris freckle, nevus or tumor | Later | A dark spot or patch that may grow. |
Heterochromia you were born with is usually harmless. If an eye changes color as a teen or adult, see an eye doctor: a new color change can be the first sign of inflammation, glaucoma-drop side effects or, rarely, a tumor.
Real conditions that change how the iris, pupil or cornea edge looks, from harmless rings to emergencies. Pick one to see a simplified drawing. The iris uses the color from the physics simulator above.
Usually harmlessSee a doctorUrgent
This is not a diagnosis. The drawings are simplified so you can recognise the signs. Only an eye exam can tell what is really going on. Sudden pain, a red eye with light sensitivity, blood in the eye or a white pupil in a child’s photo need a doctor quickly.
No. Iridology claims that every organ has a zone in the iris, but controlled, blinded studies have found no diagnostic value. The real signs above are different: each one is caused by something happening in the eye itself, or by a disease that deposits something there (like copper in Wilson disease).
Blood type is simpler: classic Mendelian genetics on two genes, ABO (chromosome 9) and RHD (chromosome 1).
A single letter in the HERC2 gene controls how strongly the neighbouring OCA2 gene works in the iris. The G version turns it down, so less melanin is made. Two G copies usually mean blue eyes.
This letter changes the OCA2 protein itself. The T version is rare, but it lightens the eye, mostly in people who carry one A and one G at the main switch. That's one route to green and hazel.
A gene on chromosome 14 with a smaller effect. The T version is linked to lighter eyes and hair.
Eyes only contain brown-black melanin. With very little of it, light scatters in the iris like in the sky and the eye looks blue. More melanin gives green, hazel, then brown. Try the physics simulator.
The inheritance math is exact. The DNA-to-color step uses approximate effect sizes that follow published findings, and other genes are treated as random variation. Forensic labs use validated models such as IrisPlex.
A and B are both dominant, O is recessive. Rh positive is dominant over Rh negative. For unknown hidden variants we use typical European allele frequencies. A blood test always beats a calculator.
Eye color research points to one DNA letter in HERC2 (rs12913832) as the main switch, with smaller helpers such as OCA2 rs1800407 and SLC24A4 rs12896399. Forensic tools like IrisPlex use six such letters.
Each person has 0, 1 or 2 “light” letters per gene. That gives 3 × 3 × 3 = 27 possible genotypes. Each one gets a melanin score from 0 to 100, with effect sizes chosen to follow published findings (HERC2 strongest, OCA2 mostly with A/G, SLC24A4 small).
Dozens of other genes also nudge eye color. Instead of ignoring them, the model adds a bell curve (normal distribution, σ = 9) around each score. The chance of each color is the area of the curve inside that color's range.
When you pick only an eye color, the lab uses Bayes' rule with population frequencies to estimate which genotypes that person probably has. Then Mendel's rule (each parent passes one of two copies, 50/50) gives the child's chances. All 27 × 27 combinations are calculated exactly, no shortcuts.
Every eye is painted live in a canvas: a color gradient chosen by the melanin score, about 800 random radial fibers, small dark “crypts”, the wavy collarette ring, a darker limbal ring and a reflection. Green and hazel eyes get a golden ring around the pupil, like real ones.
The physics simulator follows 36 wavelengths from 380 to 730 nm through three layers: melanin absorption (∝ λ−3.5), yellow pigment, collagen scattering (from Rayleigh 1/λ4 to Mie), hemoglobin bands and a black or see-through back layer. The reflected spectrum is turned into a screen color with the CIE 1931 color matching functions under daylight, then converted to sRGB.
The inheritance math is exact. The DNA-to-color step is a simplified teaching model, not a medical or forensic test. The physics uses real laws, but the layer strengths are tuned by hand for teaching. Sci-fi options are clearly labelled. Everything runs in your browser in plain JavaScript; nothing is sent anywhere.
The genetics and physics come from these studies and references. The layer strengths in the simulator and the effect sizes in the calculator are simplified by hand for teaching.
One DNA letter, rs12913832 inside the HERC2 gene on chromosome 15, has the biggest effect. It controls how strongly the neighbouring OCA2 gene works in the iris. People with two G letters usually have blue eyes; people with A letters usually have brown or intermediate eyes.
Blue eyes have very little melanin in the front layer of the iris. Light scatters in that layer, much like the blue of the sky. More melanin gives green, hazel or brown.
It is rare but possible, because many genes influence eye color. That is why this calculator shows probabilities and adds the effect of other genes as random variation, instead of giving one fixed answer.
Yes, in people with albinism. With almost no melanin, the iris becomes pale and see-through, and light reflected from blood vessels inside the eye can make it look violet or red. True purple pigment does not exist in human eyes.
Amber eyes are an even golden or copper color caused by more of a yellowish pigment (lipochrome). Grey eyes have very little melanin like blue eyes. Scientists think larger collagen deposits in the iris scatter all colors about equally, so they look grey.
The pupil is a hole into the eye. Light that goes in is absorbed inside the eye and almost none comes back, so it looks black. With a camera flash, light bounces off the blood-rich retina and returns straight to the lens, which causes red eye in photos.
The DNA does not change, but the look does. When the pupil widens, the iris tissue bunches up and the color gets stronger. Different light sources, clothes and makeup change which colors reach your eye. Light eyes change the most, because their color depends on light scattering.
This is called heterochromia. One iris, or one part of an iris, has more or less melanin than the rest. It comes in three types: a ring around the pupil (central, the most common), a slice or patch (sectoral) and two different eyes (complete, rare). Most people are born with it and it is harmless, but an eye that changes color later in life should be checked by an eye doctor.
Some real examples: a grey ring of fat at the cornea edge (arcus, sometimes linked to high cholesterol), a copper ring in Wilson disease (Kayser–Fleischer ring), small tan bumps in neurofibromatosis type 1 (Lisch nodules), new blood vessels in advanced diabetic eye disease (rubeosis), inflammation (uveitis), blood in the eye (hyphema) and a white pupil in flash photos (leukocoria). Iridology, the idea that the iris maps your organs, has not held up in controlled studies.
The inheritance math is exact for the three DNA variants used. The step from DNA to eye color is a simplified teaching model with approximate effect sizes that follow published findings. Forensic labs use validated models such as IrisPlex with six variants.