Keeping indoor spaces comfortable takes a lot of power. About half the energy Americans use in their homes goes toward heating and cooling, accounting for a sizable chunk of both utility bills and greenhouse gas emissions. Although many buildings have walls packed with insulation to maintain an ideal temperature, others—especially old buildings—are shockingly energy inefficient.

Scientists have been working on higher-tech solutions to this problem for decades. Now materials scientists have developed a color-changing film that can switch between heating and cooling modes. The film, which is thinner than a credit card, operates on very little energy and could one day envelop even the most wasteful of buildings to help radiate unwanted heat in the summer and trap it in during the winter. The findings were published recently in Nature Sustainability.

“It is a really impressive result,” says Yao Zhai, a mechanical engineer at the University of Missouri, who was not involved in the research.

The new devices take advantage of a natural phenomenon called radiative cooling, which makes outdoor temperatures drop at night and helps cool Earth as a whole. Everything around us, including our bodies and buildings, are constantly venting heat in the form of mid-infrared radiation: electromagnetic waves that are among those at a lower frequency than the light you can see with your eyes. “People can use a thermal camera and see objects, see humans, see buildings, meaning they are emitting energy 24/7,” says Po-Chun Hsu, a molecular engineer at the University of Chicago and the study’s senior author.

If you aim a thermal camera at Earth from orbit, you can also see heat radiating from the planet into the cold vacuum of space. Our atmosphere fortuitously allows more mid-infrared to radiate off-world, compared with other wavelengths of light. Although most of that heat leaves Earth, some still gets trapped by greenhouse gases in the atmosphere—enough to throw off the planet’s thermal balance and cause rising temperatures, explains Peter Bermel, an electrical engineer at Purdue University, who was not involved in the new research. As global temperatures increase, scientists are developing solutions to maximize the heat released through radiative cooling. Among these techniques are films that can wrap around structures so they emit more heat. But many areas of the world experience bitter winters, as well as sweltering summers. “You don’t want to have something that is very rapidly cooling off your house when it’s already below freezing,” Bermel says.

This dilemma was the inspiration for the new coatings, which can switch between high and low heat emission with a simple zap of electricity. Similar tunable devices already exist for visible light: so-called dynamic windows can switch from transparent to opaque to control the quantity of light they let through. But until now, no building films could do the same for mid-infrared heat.

The new material starts in cooling mode. Beneath an incredibly thin electrical conductor lies a small reservoir of water with copper ions dissolved inside. In this state, the device naturally radiates heat, cooling the inside of the building. Then, when the conductor layer applies a small electric charge, the dissolved copper deposits on its surface, forming a thin layer over the reservoir. Because copper emits very little of the mid-infrared heat it absorbs, the device now traps heat. This change can be reversed again and again, although repeated uses have diminishing returns: after 1,000 cycles, both cooling and heating modes are less efficient.

The authors estimate that if this technology is applied in a film to the outside of a building, it could save 8.4 percent of the energy used for heating and cooling in climates that experience a drastic swing in temperatures throughout the year. The building would also change color, from dark white in the summer to metallic copper in the winter, though the film could be covered with a special paint that wouldn’t interfere with mid-infrared radiation.

“Currently this is just the very first step to demonstrate the mechanism, and we already see very good progress,” says Qiaoqiang Gan, a materials scientist and engineer at King Abdullah University of Science and Technology in Saudi Arabia, who was not involved in the study. The new system seems promising, especially compared with some other research groups’ previous attempts to create a tunable device using water solutions. Some of the materials considered for use in similar devices were highly flammable and obviously unsuited to enveloping a building. The new film does not burst into flame, but that doesn’t mean it’s ready for use yet.

In addition to losing efficiency over time, the new device’s main drawback is its high cost. The thin electrode that covers the outer layer of the film is high-quality graphene, an expensive, single-atom-thick array of carbon. Graphene’s extraordinary thinness allows thermal heat to pass through while the material still conducts electricity. For these building envelopes to be feasible, the researchers will have to achieve the same result with cheaper materials—and ones that can be manufactured on a large scale. Hsu and his team plan to experiment with lower-quality graphene and other materials to find a more cost-effective replacement. They also plan to try cheaper metals such as zinc to replace the copper.

Striking a balance between price and performance will take time, so neighborhoods may not fill up with color-changing ecobuildings for years to come. But “this is a very, very hot topic” of research, Gan says, and for good reason. While cutting about 8 percent of energy usage may seem small, “if you think about it on a societal scale, that could be very impactful,” Bermel says. “Changes in energy demand and supply on the order of a couple percent can amount to a big difference.”