Purple is hot. Rhodopsin, or visual purple, doesn't just let you know when Prince is performing or when the Joker is about to gun you down. Recently, scientists discovered it's also a heat sensor.
Rhodopsin is one of the pigments in the eyeball which lets us see the world around us in glorious technicolor. It's a chromophere - a compound that responds to light - attached to a protein nestled in the retina at the back of the eyeball. When light hits the chromophere, it changes shape. This nudges the protein, which nudges others and gets a certain signal to the brain. The chromophere lets people see red-blue light, which gives it the name 'visual purple'. Rhodopsin is also very helpful when it comes to nightvision, and lets many animals see at night. It bleaches under bright light, but returns to form after some time in the dark.
When a pigment is used to show visual light, it's not good for it to respond to heat. It's hard to admire, for example, the Mona Lisa if the body heat from all the other art lovers in the room is causing you to see a wave of purple that overcomes the painting's details. Accurate color sensors have to be triggered by only very specific things.
So scientists were surprised when they found out fruit fly larvae without rhodopsin did not try to seek out the temperature that they preferred. These larvae were happy to stay where they would be mildly frozen or fried, while their rhodopsin-possessing counterparts tried to get to the sweet spot of 18 degrees celsius. Once they were injected with mouse-derived rhodopsin they started their quest for the perfect temperature once again.
Scientists don't know how exactly the rhodopsin managed to be a heat sensor as well as a color sensor, without confusing the two of them. Right now they're just wondering what other strange senses other pigments in the eye might have. Perhaps the part of the eye that senses the color red can also tell when there's a ghost nearby.