Image by Victor Tangermann

A colorful new weapon has emerged in the war on antibiotic resistance.

On Wednesday, researchers in China published a study in the journal ACS Central Science detailing their creation of a new kind of smart bandage. At first, when you apply it to a wound, the bandage is green. But if it detects a bacterial infection, the bandage turns yellow — and releases a built-in antibiotic to treat the infection.

And if the bandage senses the presence of drug-resistant bacteria — the kind that traditional antibiotics alone can have trouble killing — it releases the antibiotic and turns red. As that point, doctors can shine a light on the bandage, which causes the material to release special molecules that can kill the bacteria or at least weaken it enough to improve the efficacy of the antibiotic.

When the team tested the smart bandage on mice, it improved the healing times for wounds containing either drug-sensitive or drug-resistant E. coli bacteria.

Because the bandages themselves can detect and treat the bacteria, they can dramatically cut the time between when an infection forms and when treatment begins. The added capability to know when the bacteria is drug-resistant could make the bandages even more helpful, given that the rise in antibiotic resistance is a full-on global health crisis in need of creative solutions.