The uniform deposition of copper nanoparticles are formed by the in-situ reduction of dopamine. The fabric has superhydrophobicity after 30 washing cycles and after dyeing. The fabric has high antibacterial activity against E. coli after 50 washing cycles and after dyeing.