Surface-functionalized gold and silver nanoparticles for colorimetric and fluorescent sensing of metal ions and biomolecules