Methacrylate copolymers with pendant piperazinedione-sensing motifs as fluorescent chemosensory materials for the detection of Cr(VI) in aqueous media.