It is hard to court the opposite sex when you are cemented in place, which explains why polyps—the tiny creatures whose exoskeletons form corals—do not reproduce by mating. Instead they cast millions of sperm and eggs into the sea, where they drift up to the ocean surface, collide, form larvae and float away to form new coral reefs.

Polyps may not be picky about their “mates,” but they are sticklers for timing. The polyps in a coral reef will “blow” their eggs and sperm simultaneously in quick frenzies for just one, or maybe a few, consecutive nights a year—and they usually do so shortly after sunset on evenings closely following a full moon. Scientists are now beginning to solve the mystery of this feat of simultaneity.

Because polyps have no central nervous system, scientists have been at a loss as to how the individual polyps coordinate so well with one another. A reef generally picks one day during a full moon in summer to blow, for 20 minutes or so, during the twilight hours. Although scientists have yet to agree on how corals know which month to spawn, Alison Sweeney, an evolutionary biologist at the University of California, Santa Barbara, choose a narrower question: How do corals select the precise moment to blow?

Sweeney suspected that a hue shift in the twilight sky away from red, toward blue, was the polyps’ cue. Prior to a full moon, the moon reaches the sky before sunset and, reflecting the ruddy light of the setting sun, makes the whole sky slightly redder. Just after a full moon, when sunset precedes moonrise, the moon is no longer there to reflect the pinkish tint, so twilight turns bluer.

To test her hypothesis, Sweeney led a team from U.C.S.B. and Duke University to the Virgin Islands in August 2009. They observed a reef of elkhorn, a common Caribbean coral, for six evenings near the time when they thought it would release eggs and sperm. Nearby they suspended an optical cable to reef depth—about 2.5 meters below the water—from a floating spectrometer. They noted shifts in the ocean’s color each twilight. Consistently, it reflected the sky’s color. The coral spawned during twilights of radiant blue: the third and fourth nights after a full moon, between 9:20 p.m. and about 9:50 p.m.

Sweeney, whose team reported its results in the February Journal of Experimental Biology, believes that like sea urchins (which also link reproduction to lunar cycles), elkhorn “see” color shifts through their skin, which contains photo­receptors of the kind found in human retinas. She is not yet sure why they prefer blue hues to red. But when the receptors recognize the right color, a biochemical reaction probably ripples through the entire reef—now!