Combining nanophotonics and thermoelectrics, engineers generate materials capable of distinguishing between tiny differences in wavelengths of light.