The same three gobies after being on a black background (left column) versus a white background (right column).

The unassuming rock goby, a small fish that can be found in rock pools around the United Kingdom, southern Europe and North Africa, is a master of camouflage, a new study finds.

Within a minute, the rock goby can change its color and brightness to disguise itself from hungry predators, such as birds and fish.

"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," said lead researcher Martin Stevens, a senior research fellow in the Centre for Ecology and Conservation at the University of Exeter, in the United Kingdom. [Photos: The Freakiest-Looking Fish]

Intrigued by the goby's ability to change color, Stevens and his colleagues decided to test how fast these small coastal fish could change their appearance.

The team collected fish at Gyllyngvase beach in Falmouth, Cornwall, and immediately put the animals in a grey bucket with fresh seawater to minimize color changes before the experiment. Then, to determine how the gobies respond to varying degrees of brightness, the researchers placed 40 of the fish in containers with white or black backgrounds. In a second experiment, researchers placed 40 fish in differently colored buckets of red or blue.

It only takes one minute for the rock goby fish to change its color and brightness. (Image credit: Alice Lown)

Over the next hour, the researchers took photos of the fish in the buckets. The scientists then analyzed the photos and measured how long it took the fish to change their shade.

The camouflage happened almost immediately, the researchers found. The gobies were able to change both their brightness and color to match the background of the buckets.

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

The ability to rapidly change color should be a major advantage for fish when predators are nearby. Gobies are constantly threatened by birds that forage in rock pools during low tide, and by larger fish when tides are high. To stay hidden, the fish must quickly change color as the waves and tides push them against differently colored backgrounds.

The rapid color change is powered by chromatophores, special cells on the fishes' bodies. These cells can either spread or condense differently colored pigments across the fish. If the fish swims to a new location, its visual system guides the cells' color change.

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 online today (Oct. 15) in the journal PLOS ONE.

Follow Laura Geggel on Twitter @LauraGeggel and Google+. Follow Live Science @livescience, Facebook & Google+. Original article on Live Science.