A dual-function probe based on naphthalene diimide for fluorescent recognition of Hg2+ and colorimetric detection of Cu2+