A fascinating video of a sleeping octopus rapidly changing colors has gone viral on the internet, making people wonder if the eight-legged sea creatures are also capable of dreaming.

The footage is from an upcoming PBS TV show called ‘Octopus: Making Contact’ in which the cephalopod can be seen changing colors, beginning with grey to yellow and then eventually turning dark brown.

According to multimedia web portal Big Think, Alaska Pacific University Professor and marine biologist David Scheel who studied the octopus in his home, suggested the animal’s color may correspond with its dreams.

Scheel speculated the octopus named Heidi might be dreaming about eating a crab at the bottom of the sea, and that is the reason for the dark brown shade. “If she is dreaming, this is a dramatic moment,” he said.

Although it is completely normal for octopuses to change colors to protect themselves from predators, the biologist said he has never witnessed anything like this before.

The video shared by user Domenico Calia became an instant hit and many took to Twitter reacting to the viral clip.

“A marine biologist films this octopus changing colors while dreaming and it’s spectacular” read her caption.

“They're such amazing creatures. They will attach themselves to rock for years to make sure their offspring survive. They can navigate complex paths, and are sweet and will let you pet them. I love them so much,” tweeted a user.

“I am speechless with awe! Absolutely incredible!!!” wrote another.

The wonder creatures have thousands of color-changing cells called chromatophores, iridophores, papillae, and leucophores. These special cells help them blend in the surroundings, disrupting their body outlines, making them difficult to locate by sight, as quoted in a study called Cephalopod Camouflage: Cells and organs of the skin.

octopus
An octopus swims at the Ocearium in Le Croisic, western France, Dec. 6, 2016. LOIC VENANCE/AFP/Getty Images