method to prepare an amphoteric polymer nanoparticle is provided. First, a protonated polianiline is formed by an oxidative polymerization. Then, the protonated polianiline is washed with a base to partially neutralize the secondary amines of the polianiline such that an amphoteric polymer nanoparticle is obtained. The pH-adjusting polymer mother grains and pH-adjusting textiles are also provided.