Rhus typhina
Linnaeus (
Rhus typhina
L.) fruit clusters are rich in various bioactive components, among which anthocyanins exhibit distinct pH-responsive properties, making them an ideal natural pigment source for the development of smart textiles. In this study, natural pigments extracted from staghorn sumac fruit clusters were applied to dye cotton knitted fabrics, and a post-mordanting process using tannin was employed to improve the dyeing performance. A fiber-tannin-pigment ternary hydrogen bonding network was constructed via tannic acid post-mordanting, enabling supramolecular immobilization and stabilization of pigment molecules. The dyed fabrics exhibited a K/S value of 2.13 and a watercolor fastness rating of 4–5. The adsorption behavior of the fabrics toward the natural pigment followed a pseudo-second-order kinetic model, indicating that chemisorption was the dominant mechanism. Moreover, the mordanted fabrics demonstrated an antibacterial inhibition rate of 84.2% against
Staphylococcus aureus.
The dyed fabric showed excellent pH-responsive behavior, with the maximum absorption wavelength of the pigments shifting reversibly from 518 nm in acidic conditions to 560 nm in alkaline conditions. This shift occurred across the pH range of 3.01 to 7.70. Even after 25 cycles of acid–base treatment, the fabrics retained stable chromatic performance, demonstrating good cyclic durability. Mechanistic analysis confirmed that this reversible color change originated from the protonation and deprotonation equilibrium of the carboxyl and phenolic hydroxyl groups within the pigment molecules under varying pH conditions. This study provides an innovative approach for developing intelligent textiles that can monitor human sweat non-invasively.