Many animals have one superpower. Geckos are blessed with several.

Their eyes can distinguish colours by the light of the moon - conditions in which humans and most other animals are colour-blind. They can instantly shed their tail if they are caught by a predator, and then grow a new one: a skill beyond the powers of most animals with a backbone. And, most famously of all, they can walk effortlessly up walls and along ceilings - even though they may weigh as much as a small rodent.

Amazing though these skills are, they are no longer quite so mysterious as they once appeared. We have learned a great deal about how geckos evolved their impressive party tricks, and we have even begun to imitate some of the skills in our technology.

First, here are some geckos in action:

Geckos live in warm regions the world over. With about 1450 known species, they account for 25% of all known lizard species, and their fossil record stretches back more than 100 million years to the dinosaurs' heyday. Geckos really are one of nature's success stories.

The geckos can see colours by the light of the Moon

They do not owe their evolutionary success entirely to their superpowers.

For instance, some geckos survive perfectly well without the ability to cling to walls, and one successful group of geckos does not even have legs. Other species can shed their tails but do not then grow a new one: they learn to live with a stump. A few species of gecko are most active during the day: these species may not be able to discriminate colours at night.

The gecko ancestor was active at day too, which actually helps explain how geckos evolved their extraordinary nocturnal colour vision.

This particular superpower is less conspicuous than the others, which is probably why it went unnoticed by researchers until about a decade ago. Almut Kelber at Lund University, Sweden, was the first to spot the talent, working with her colleague Lina Roth.

If an animal is small, and has small eyes, it has to optimise

The two researchers taught helmethead geckos to love blue and hate grey. They fed the geckos crickets held in either blue or grey tweezers, but made sure that the "grey" crickets had always been dusted in unpalatable salt, so that the geckos would learn to shun them.

The geckos rejected the "grey" crickets and gobbled down the "blue" ones, even when the researchers replicated the dim conditions of night that rob most animals of their colour vision. In other words, the geckos can see colours by the light of the Moon. The researchers estimate that gecko colour vision is 350 times more sensitive to low light than ours.

Kelber, Roth and their colleagues began to study gecko eyes to work out how and why they evolved their unusual ability.

If an animal can distinguish colours, it is normally because the retina in the eye contains special light-sensitive cells called cones, each tuned to recognise light of a specific colour range. Human eyes normally carry three types of cone, each sensitive to different colours, which is why the world we see is so colourful.

Nocturnal geckos can dilate their pupils very wide

Cones need a relatively bright light source to work, so our eyes also contain another type of cell called rods. These can detect dim light, but they do not tell our brain anything about its colour.

The ancestor of geckos embraced daytime activity so much that it gradually lost its rods altogether.

"If an animal is small, and has small eyes, it has to optimise," says Kelber. "That sometimes means losing one thing to be able to keep something else. Lizards obviously survived better when they placed as many cones as possible in the retina, but no rods."

But that meant evolution had to be creative when geckos began to turn nocturnal.

Their cones evolved to be larger and more sensitive to light, effectively becoming rod-like. As a consequence of this evolutionary fudge, geckos' colour-discriminating cone cells work at night.

Nocturnal geckos have evolved multifocal lenses

This is one of several ways that gecko eyes have adapted to the night life.

Nocturnal geckos can dilate their pupils very wide, to let in as much of the dim night light as possible. When humans do this, our pupils occupy about 16 times as much space as they do in bright light, but the pupils of nocturnal geckos may become 300 times larger.

But this solution raises yet another problem: blurry vision.

Gecko eyes are relatively small, so the distance between the cornea and the retina – the "focal length" – is short. As professional photographers will know, a wide aperture coupled with a short focal length produces a blurred image. Light of one colour might be pulled precisely into focus on the retina, but because each colour behaves slightly differently, other colours will not form a sharp image.

The problem is that the image contains a lot of noise

So nocturnal geckos have evolved multifocal lenses. Concentric zones in their eyes each bend light to a slightly different degree, and it turns out that the different zones are perfectly tuned to bring into focus exactly the colours of light to which geckos are sensitive.

Combine the gecko's rod-like cone cells, their unusually versatile pupils and their multifocal lenses, and you have a fairly complete explanation for their nocturnal colour vision.

If we ever want to see colours at night, perhaps we could develop technology that works in the same way. Already, our standard daytime vision can benefit from gecko-like optical innovations.

For instance, some multifocal contact lenses work like the gecko version, says Kelber. "One of my colleagues here who uses contact lenses has tried them," she says. "He says the bifocal lens works OK, but the trifocal lens is very confusing."

Many geckos have fat, sticky toe-pads

The problem is that the image contains a lot of noise. For instance, one zone of the lens might be perfect for focusing blue light, but light of other colours passing through this zone will not be brought into focus. The brain has to learn to pay attention to the small amount of light from each zone that is focused and ignore the rest.

Geckos can do this, but it evidently takes a lot of practice for a human. Still, it might well be achievable. In contrast, no amount of practice will allow us to walk like a gecko.

Many geckos have fat, sticky toe-pads that will support their weight as they scurry up a wall.

A 2012 study shows that the trait has evolved no fewer than 11 times, in slightly different ways, in different gecko groups. "For example the 'cushion' that helps the pad accommodate to the substrate is a derived pad of fat in some geckos and a blood sinus system in others," says co-author Aaron Bauer at Villanova University, Pennsylvania, US.

Researchers have spent about 200 years trying to work out how gecko toepads work

Gecko toepads have an extraordinary ability to stick to surfaces. But arguably what makes them truly impressive is that they also lift off effortlessly, allowing the lizard to run at gravity-defying angles.

"Getting things unstuck is much more challenging than getting them stuck," says Anthony Russell at the University of Calgary in Canada, another co-author on the 2012 study.

For instance, sticky tape is hard to unstick. "Try peeling the tape off without damaging the surface that it is stuck to, or tearing the tape into fragments," says Russell. This is a tough task, it expends valuable energy, and it leaves the tape less sticky for next time.

Researchers have spent about 200 years trying to work out how gecko toepads work, says Russell, and we still do not have a complete explanation. But two elements are clearly crucial: the microscopic structure of their skin, and the way they place and lift their toes.

Look at a gecko foot under a powerful microscope and you will see that it is covered in hundreds of thousands of hairs called "setae". What's more, the ends of some of those setae are covered in even tinier brush-like projections.

Fifteen years ago, Kellar Autumn at Lewis and Clark College in Portland, Oregon and his colleagues tried a purposely simple approach: they isolated a single seta and studied its powers of adhesion.

Several gecko-inspired sticky tapes are now on the market

When the team brushed the hair against a smooth metal surface, a bond formed between the two: a bond ten times greater than anyone had anticipated. The bond was so powerful, the researchers could eliminate two long-standing explanations for gecko adhesion. It was not a product of the friction between the hair and the surface, and nor was it created by a weak vacuum forming at the tip of the hair.

Instead, Autumn concluded that intermolecular forces between the seta and the metal were responsible for the adhesion. What's more, the total of all the intermolecular forces between a surface and each of the hairs on each of a gecko's four feet is easily enough adhesive strength to keep the animal firmly attached to a wall or ceiling.

The study helped identify a blueprint that we could use to produce powerful adhesives. Several gecko-inspired sticky tapes are now on the market.

But many of them are designed in an overly complex way, says Russell. What's more, they do not necessarily perform as well as real gecko toe-pads, particularly when it comes to effortlessly attaching and detaching.

In fact, not all geckos can do this either.

Some can cling to a wall, for instance to escape a predator, but they do not have the power to move quickly up and down vertical surfaces. The geckos that are most adept at running up walls, including tokay geckos, can do so because of an unusual feature of their feet.

Not only have geckos evolved a very effective adhesive, it is a self-cleaning one too

Most reptiles lift each foot in a heel-to-toe fashion, but these geckos lift their toe-pads first, peeling them away from the surface before they raise their foot. "It's by deployment of this behaviour that geckos such as the Tokay gecko release the adhesive bond," says Russell.

That means we need to understand the evolution of the toe-pads if we want to replicate the way that geckos easily release themselves from contact with a surface, says Russell. He and his colleagues are now beginning to explore this in their work.

There is one more remarkable thing about the gecko's sticky toepads.

About a decade ago, Autumn and his colleagues tried to interfere with gecko hairs' ability to cling to a glass surface, by first dipping them in dirt. As you might expect, the dirt stuck to the hairs and impeded their ability to stick to the glass.

Water literally jumps off the back of box-patterned geckos

But remarkably, all it took was a few simulated gecko steps on the clean glass for all of the dirt to fall away, restoring the hair's stickiness. It seems the dirt is attracted more strongly to the glass than to the hair. In other words, not only have geckos evolved a very effective adhesive, it is a self-cleaning one too.

It is not just gecko toe-pads that are self-cleaning. In some species the entire body automatically cleans itself.

In 2015, Gregory and Jolanta Watson at the University of the Sunshine Coast in Maroochydore, Australia, and their colleagues reported that water literally jumps off the back of box-patterned geckos, carrying dirt with it.

Again, it is the setae on the skin that are responsible.

They form a microscopic bed of nails, across which water droplets will simply roll instead of soaking into the surface. When two of those water droplets collide, they coalesce into a larger droplet. This merging frees up energy that is converted into movement, and the larger droplet launches itself off the skin.

"We think the removal of water may be more related to keeping the skin free from water so microbial growth is inhibited," says Watson. "To our knowledge a few insects, the lotus leaf and the gecko are the only organisms thus far to demonstrate this phenomenon."

Geckos clearly owe a lot to the tiny setae on their skin. Earlier this week we learned a little more about how these setae evolved in the first place.

Xiaosong Gu at Nantong University, China, and his colleagues have just become the first researchers in the world to sequence a gecko genome.

When a gecko is attacked, it can instantly detach its tail

Their results show that Schlegel's Japanese gecko carries 71 genes for an important skin protein called beta-keratin. For comparison, alligators carry just two beta-keratin genes. All of those extra genes help the gecko produce the extra skin proteins it needs to grow so many setae.

The genome also reveals some of the genetic secrets behind the other gecko superpowers. For instance, it shows that geckos have lost genes for two of the five types of protein other reptiles use in vision. This must have happened when the daytime-active ancestor of geckos lost the rod cells in its eyes, the event that set the geckos on the road towards nocturnal colour vision.

Gu's team also looked at the genes involved in the third significant gecko superpower: its ability to regenerate its tail.

Many animals have evolved anti-predator strategies, but few are as extreme as self-amputation, or "autotomy" as it is sometimes known.

Certain genes are particularly active in the tail stump

When a gecko is attacked, it can instantly detach its tail. The tail will then wriggle to distract the predator while the gecko makes its escape. A few other reptiles and some amphibians can do something similar. They sometimes even return later to eat their tail and recover some of the energy contained in its tissues.

We know that gecko tails come with a pre-formed cellular "score line" where the tissue is weaker, which explains how they can drop their tail. But we are still learning about what happens next: some gecko species will, over the course of a few months, grow a new tail out of the stump left by the last one.

The new gecko genome offers some clues. Gu and his colleagues found that certain genes are particularly active in the tail stump. Unsurprisingly, they include genes for wound healing, cell growth and division, and tissue regeneration.

As with any animal that has a remarkable ability for tissue regeneration, there is a huge amount of interest in working out how the geckos do it. The hope is that, ultimately, we might be able to activate similar sorts of processes in humans.

Gu has good and bad news for those efforts. "Humans possess the genes that geckos use for tail regeneration," he says. "[But] we cannot simply claim that these genes may promote the regeneration ability of human at the present stage."

Even so, the work does offer new genetic targets that might be worth studying. We might never be able to follow geckos up walls and along ceilings, but one day we might just be able to match their powers of regeneration.