Using the flatworm's ability to survive and even regrow its head after decapitation, researchers have shown the animal will shy away from a light source even when it no longer has eyes.

And these eyes can do more than you think; the study also found that in spite of being little more than dimples with simple light-sensing nerves, those eyespots are capable of distinguishing between several colours.

A small team led by researchers from the National Centre for Biological Sciences in Bangalore, India, made the discovery using a type of flatworm, or planarian, called Schmidtea mediterranea.

Planarians might be a biologist's dream, but for the rest of us they're fuel for nightmares.

Cut off their head, or slice their bodies down the centre, and each section will regenerate the missing body parts.

Scientists have even managed to swap the heads of different flatworm species, which was then replaced as the body regrew its original species' head. Because clearly nature is a horror movie.

Since planarians have rather simple brains, this neat Wolverine-like talent makes them great subjects to study how nervous systems and body plans develop under different conditions.

In fact the flatworm's entire body is pretty basic. At the head end there are two small shadows designating light-detecting structures we can think of as primitive eyes.

Unlike our eyes, though, the hollows lack the structures needed to focus detailed images, not to mention the computing power to process them.

Instead, planarian eyes are pits with lined with cells that respond to light stimuli by messaging clumps of neurons we could generously call a brain.

Those light-sensitive tissues consist of a pigmented cells that contain just one kind of opsin, or protein that turns a wavelength of radiation into something that a nerve will respond to.

As basic as they are, it's enough to tell the worms the direction bright light is coming from so they can hightail it away.

In a recent study on the animals, biologist Akash Gulyani from Bangalore's National Centre for Biological Sciences made a rather odd discovery.

If forced to choose between environments illuminated by green or blue light of equal intensities, the planarians showed a preference for the green space. When red is thrown into the mix, they'll opt for that colour.

Weirder still, they can distinguish between subtle differences in wavelengths just 25 nanometres apart.

Planarians might not be able to enjoy the Wizard of Oz in full technicolour, but managing to discern different colours with just one opsin and a simple network of brain cells reveals a clue about how its visual system functions.

It seems as if the animal best detects wavelengths that correspond with the colour blue. As the wavelengths move away from blue part of the spectrum, the flatworm perceives it as if it's getting darker, making greens and reds preferable.

Since blue light waves scatter relatively easily in water, the colour preference doubles as a handy way to distinguish the safety of the depths.

But the real kicker came when they were decapitated.

Without those eyespots, the planarian subjects still showed a preference for avoiding ultra violet light.

Many species, including cuttlefish, hydra, and fruit flies, have what's called extraocular or eye-independent sensory systems that are able to detect light using their skin or some other body part.

For a species like the planarian that can reproduce by splitting in half, sensing light when the eyes are yet to develop is a handy ability.

Once the eyes regrow, according to the researchers, their usual method of seeing takes over again.

The research could tell us something about how vision has evolved over hundreds of millions of years not just in planarians, but other animals as well.

"Because planarians have eye structures and neural networks that appear simple yet similar to those observed in other animals, these acute and distinct light sensing and processing abilities may be more widespread in nature," the researchers write in their report.

Let's hope nobody has to go around lopping off too many heads to find out.

This research was published in Science Advances.