A colorimetric and fluorescent chemosensor for the detection of an explosive--2,4,6-trinitrophenol (TNP).