A color-coded "smart tag" could let consumers know if their packaged product has spoiled.

The tag could also be used to determine if medications have expired along with other perishables, an American Chemical Society news release reported.

"This tag, which has a gel-like consistency, is really inexpensive and safe, and can be widely programmed to mimic almost all ambient-temperature deterioration processes in foods," Peking University's Chao Zhang, Ph.D., lead researcher of the study, said in the news release.

The new freshness system could alert consumers that their product has been exposed to high temperatures, even if they wouldn't have noticed when opening or eating it.

"The tag still gives a reliable indication of the quality of the product," Zhang said.

The devices would be no larger than a corn kernel .

"In our configuration, red, or reddish orange, would mean fresh," Zhang said. "Over time, the tag changes its color to orange, yellow and later green, which indicates the food is spoiled."

The tag is extremely specific; it rates the food on a scale between 100 percent fresh and 100 percent spoiled. If a product is predicted to remain fresh for 14 days but at that time the tag is orange, it would indicate the product had lost half its freshness and would only be edible for about seven additional days.

The team tested the new system by having it determine the amount of E. coli (food-spoiling bacteria that can cause human illness) in milk.
"We successfully synchronized, at multiple temperatures, the chemical evolution process in the smart tag with microbial growth processes in the milk," Zhang said.

The tags employ nanorods that can change color when at different stages.

"The gold nanorods we used are inherently red, which dictates the initial tag color," Zhang said. "Silver chloride and vitamin C are also in the tags, reacting slowly and controllably. Over time, the metallic silver gradually deposits on each gold nanorod, forming a silver shell layer. That changes the particle's chemical composition and shape, so the tag color now would be different. Therefore, as the silver layer thickens over time, the tag color evolves from the initial red to orange, yellow, and green, and even blue and violet."

The materials in this tiny tag would cost less than one cent.

 "In addition, all of the reagents in the tags are nontoxic, and some of them (such as vitamin C, acetic acid, lactic acid and agar) are even edible," Zhang said.

The research was announced at the American Chemical Society's 247th annual meeting.

WATCH: