Optical and electrochemical tuning of hydrothermally synthesized nitrogen-doped carbon dots