Scientists discovered the secret behind a "magic trick" performed by tiny ocean creatures called sea sapphires.

These incredible creatures appear as a brilliant shade of blue, purple or green and then become invisible in an instant, the Weizmann Institute of Science reported. Researchers believe the "trick" is used to escape a predator's hungry gaze while still showing off for potential mates.

Sapphirinidae belong to a subclass of crustaceans called copepods, and are almost microscopic, making them difficult to study. To make their findings, the researchers looked at the makeup of a crystal layer on the backs of male Sapphirinidae of several different species. In order to do this, they measured the reflectance to determine color, and used a microscope technique called cryo-SEM to observe crystal organization. The colors are caused by light reflecting off a multilayer reflector, dubbed a photonic crystal, that is composed of crystals of guanine.

The researchers observed that the guanine plates in Sapphirinidae are stacked in precise periodic arrays and the spacing between these plates determines the creature's color. When males of certain Sapphirinidae species rotate their backs to the light at a 45-degree angle as they perform a spinning maneuver, the wavelength of the reflected light is shifted out of the visible light range, leaving them invisible. The researchers determined the spacing between the plates acts as a sort of wavelength "tuning" mechanism that determines the Sapphirinidae's color. The closer the plates are to one another, the shorter the wavelength and the bluer the reflected light.

The new findings provide fascinating insight into the world of Sapphirinidae and could also help inspire designs for artificial photonic crystal structures that can manipulate the flow of photons. These types of devices could be used for applications such as "adaptive or changeable reflective coatings, optical mirrors and optical displays."

The findings were published in a recent edition of the Journal of the American Chemical Society.