Room-temperature phosphorescence and fluorescence nanocomposites as a ratiometric chemosensor for high-contrast and selective detection of 2,4,6-trinitrotoluene.