Whether we're commuting to work or relaxing in the park, going outside is a part of our daily routine. When exposed to the sun for an hour, we absorb a healthy amount of Vitamin D, but if we stay in the UV light for too long, we face an increased risk of skin cancer, according to the Centers for Disease Control (CDC). So how can we figure out the right amount of time to spend outdoors?

Now, scientists have developed a wearable, UV-sensor prototype that indicates whether the user needs more or less sun, according to a press release by the USC Viterbi School of Engineering. The sensor is described in an article written by Andrea M Armani, Associate Professor, and doctoral candidate Michele E. Lee, both of USC, and published in ACS Sensors.

“My lab developed a UV responsive material that actually changes colors when it’s exposed to UV, so that when someone’s exposed to UV they are able to tell how long they’ve been in the sun,” Armani said in a video published with the release. The 0.5 by 0.5 millimeter patch is water proof, sunscreen proof, flexible, and unlike most UV sensors can operate without a power source. Armani compares the prototype to a Band-Aid: you can wear it and then throw it away.

Armani and Lee based the amount of time needed for the patch to change colors on the recommended daily dose of Vitamin D given by the World Health Organization. The patch changes from transparent before being exposed to sunlight to an orange color when the user has had enough sun, the release noted.

The patch itself consists of three layers: a transparent polymer backing forms the base, an active layer based on an o-nitrobenzyl reactive group, and a tertiary polymer top, Armani said. These materials used to create the sensors have been patended by Armani and Lee. These sensors can only be stored for a maximum of five weeks.

Read More: Sun Exposure: Vitamin D And Other Health Benefits Of Sunlight