A brand new type of lens called a metalens has just passed a major hurdle. A metalens is a flat surface that use nanostructures to focus light, and it could change optics forever by replacing the traditional bulky, curved lenses we know.

Up until now these ultra-compact lenses have had enormous potential, but they've struggled to focus a broad spectrum of light. Well, that just changed.

For the first time researchers have managed to develop a single metalens capable of focusing all the colours of the rainbow – the entire visible spectrum of light, making white light – into one point at a high resolution, something that has required multiple lenses in the past.

The potential for metalensing is vast. From better lenses in your smartphone cameras to a whole new breed of wafer-thin virtual reality and augmented reality headsets, according to the team from the Harvard John A. Paulson School of Engineering and Applied Sciences (SEAS) in Massachusetts.

"Metalenses have advantages over traditional lenses," says lead researcher Federico Capasso. "Metalenses are thin, easy to fabricate and cost effective. This breakthrough extends those advantages across the whole visible range of light. This is the next big step."

Making a metalens like this is so tricky because different wavelengths of light move through materials at different speeds. That leads to focusing errors known as chromatic aberrations, which traditional lenses get around through curved surfaces.

Red moves the fastest, while violet is the slowest – the full rainbow colour gamut.

Metalenses don't have the same space in which to work as traditional lenses, so can't be shaped in the same way. Instead, the SEAS team used tiny arrays of titanium dioxide nano-sized fins to deal with the chromatic aberrations.

By experimenting with paired units of these nanofins, the scientists were able to control the speed of different wavelengths of light passing through the lens, finally ensuring that every colour was focused in a single spot.

It's almost like creating a miniature maze to guide different colours through the lens, and the team says the new technology can dramatically reduce thickness and design complexity compared to a standard multi-layered lens approach.

"Using our achromatic lens, we are able to perform high quality, white light imaging," says one of the researchers, Alexander Zhu.

"This brings us one step closer to the goal of incorporating them into common optical devices such as cameras."

That goal is still some way off though: the next stage is to scale up the metalens to a 1 cm (0.39 inch) size, at which point the possibilities for VR, AR, standard cameras, microscopes and all kinds of optical technology really start to open up.

Early last year the same team managed to get a metalens to handle different wavelengths of light through the use of nanofins, but the focus points weren't at a uniform distance. Now though, the whole colour spectrum can be brought to one point, through a lens that's thinner than a human hair.

As an added bonus, the metalenses can be developed in the same facilities where computer components are produced, cheaply and easily, according to Capasso.

"In my opinion, this technology will be game-changing," he told Roland Pease at the BBC in 2016, in the early stages of the metalens development.

The research has been published in Nature Nanotechnology.