Now you see me, now you don't. That's the magic trick of rock gobies, unassuming little fish commonly found in rock pools that are masters of camouflage, new research shows.

Within a minute, the rock goby (Gobius paganellus) can change both its color and brightness to disguise itself, whether it's from hungry predators like birds and fish or families hunting in rock pools. So don't worry if you've visited the waters around Britain, southern Europe, and North Africa and were unable to solve this rock riddle.

"These small fish that live in rock pools need excellent camouflage to avoid predators, and because they're often seen against many backgrounds, rapid color change enables them to be hidden in many places quickly," lead researcher Martin Stevens, a senior research fellow in the Centre for Ecology and Conservation at the UK's University of Exeter, told Live Science.

Intrigued by the goby's color-changing talent, Stevens and his colleagues decided to test how fast these small coastal fish were on the draw.

The team collected gobies from Gyllyngvase beach in Falmouth, Cornwall, then photographed them against different backgrounds to test their speed and assess their color palette. After analyzing photos and the color wheel of shades displayed by the fish, researchers found that the gobies were able to change both their brightness and color to match the background of the buckets they were placed in.

"What's more, they can change very fast, looking different even in just approximately one minute," Stevens said.

Gobies can credit the rapid color change to special cells in the fishes' bodies called "chromatophores." These cells can either condense or spread pigments of different color across the fish, creating for a clever façade.

Other camouflage studies have found that chameleons, cuttlefish, flatfish and crabs also have this ability to change color. But previous studies have rarely quantified the changes of color and brightness or how fast the changes happen, the researchers said.

The study was published in the journal PLOS ONE.