A new smartphone-compatible device that is held like a pencil could make it practical to acquire spectral images of everyday objects and may eventually be used for point-of-care medical diagnosis in remote locations.