Introduction

Textile and apparel industries contribute to satisfying the growing need for clothing, which is the second basic need for humans after food. One of the consumers' primary demands is colored textiles. However, a colorful appearance is typically achieved by multiple consecutive steps of wet processing. Commonly, dyes/pigments are routinely fixed by thermal/mechanical retention, physical adsorption, covalent bonds, or complexation with metals between fiber and dye molecules in the conventional wet processing method (Perkins 1996). Toxic functional groups such as methine, azo, nitro, anthraquinone, aril methane or carbonyl, etc., (commonly known as chromophore and auxochrome) present in the dye molecules are mainly responsible for imparting color (Gürses et al. 2016). Statistics show that more than 10,000 variants of dyes and pigments are used in the different manufacturing sectors, where these sectors demand over 700,000 tons/year of synthetic dyes globally (Wan et al. 2021b). Among them, about 200,000 tons/year of these dyes are discharged as effluents due to the inefficient and lengthy dyeing and finishing process in the traditional textile industry (Wan et al. 2021a). In addition, a large volume of water is required throughout the operation. An available knit-dying factory needs an average of 10 gallons of water for a single pound of cotton dyeing (Shaikh 2009). Besides, 1 kg of cotton dyeing requires approximately 10 g of reactive dyes, 76 g of alkali, 1.2 kg of salt, and many auxiliaries, such as leveling agent, wetting agent, sequestering agent, soda and anti-creasing agent, peroxide, etc. (Kim et al. 2017). Unfortunately, these dyes and auxiliaries are poisonous to human and other living things and pollute water sources severely, putting the aquatic ecosystem at risk in various ways. Owing to the high structural stability of dyes/pigments to sunlight, temperature, water, or other factors, they remain stable in the atmosphere year after year (Chen et al. 2020b). Again, textile materials require additional functional finishing such as antibacterial, fire resistance, UV repellency, waterproofing, or self-cleaning (Le Marechal et al. 2012; Sultana et al. 2019). These functional finishing agents are more environmentally defiant due to their complex aromatic composition and synthetic origin. As a result, minimizing water pollution and chemical use in textile dyeing and finishing has become an immediate need for a safe and sustainable world.

Usually, the extracts of various branches of plants come in the front line as natural dyes to resolve the aforementioned problems. The presence of flavonoids and natural pigments in the plant branches can express a broad spectrum of colors (Vankar 2000). Therefore, many pieces of research have been carried out in recent decades on synthesizing plant-derived natural dyes and their application for textile coloration (Samanta 2020). Likewise, we have also attempted to extract natural dye from Macadamia integrifolia for cotton dyeing as a potential substitute for reactive dyes (Habib et al. 2017). However, we observed both in our study (Habib et al. 2017) and other research (Samanta 2020), besides numerous advantages, natural dyes pose many limitations. For example, colors obtained from plant components are non-reproducible, highly expensive, less color yieldable, and offer poor fastness properties. Also, the necessity of excessive auxiliaries or mordants and the unavailability of technical information make them more challenging for commercial application. Hence, the organized application of greenly synthesized metal nanomaterial is a much better option for coloration and multi-functionalization of textile materials, simultaneously (Hasan et al. 2020b, c). These nanomaterials demonstrate a wide range of colors, depending on the particle size, shape, and synthesis protocol, due to their localized surface plasmon resonance (LSPR) properties (Chen et al. 2021a; Guo et al. 2021). In addition, metal ions and metal-based compounds such as silver are inherently used to reduce at least twelve species of bacteria and highly toxic microorganisms due to the biocidal action of silver leaching (Mahmud et al. 2018; Ru et al. 2018). With the utilization of these features of nanomaterials, a simple one-step treatment can enhance both functional properties and the colorful appearance of textiles (Hasan et al. 2019, 2020a). Therefore, the nanomaterials have been applied to the fabric substrates using sol–gel, in-situ deposition, dipping-coating, and padding methods for textile treatment (Rehan et al. 2019; Yu et al. 2019). Besides the applications in textiles coloration and antibacterial finishing, nanomaterials are widely used in optical sensors, biomedical fields, chemical industries, drug-gene delivery, transistors, photo-electrochemical, catalysis, light emissions, cosmetics, and other important areas (Marin et al. 2015; Natsuki et al. 2015). Unfortunately, these broader applications are hindered by the aggregation and agglomeration tendency of nanoparticles (Rao et al. 2020; Shahid ul et al. 2020). The chemical reduction method, in this regard, requires toxic chemicals and cannot serve alone as a simultaneous reducing and stabilizing agent to stop agglomeration completely (Chen et al. 2021a; Iravani et al. 2014; Wang et al. 2022). To prevent particles agglomeration in a green synthesis protocol, naturally derived reducing and stabilizing agents are essentially required (Chen et al. 2021b; Xiong et al. 2020, 2021). Plant phytochemicals, polysaccharides, and other carbohydrates sources are decent choices in this respect and can serve as a supplementary template for the colloidal synthesis of metal nanoparticles (Huang et al. 2019; Thangaraj et al. 2017; Wang et al. 2021). Gardenia (Gardenia jasminoides) is a plant widely used in medicine, food colorant, and various health supplements. The water-soluble carotenoid fraction in gardenia, which principally contains crocin and crocetin, is mainly referred to as gardenia yellow (Xu et al. 2016). Although gardenia yellow dyes were previously extracted, their application in reducing and stabilizing silver nanoparticles (AgNPs) via in-situ synthesis on the organic cotton fabrics (OCFs) for coloration and simultaneous functionalization was not explored.

It is worth pointing out that organic cotton is the primary raw material for enhancing textile sustainability. It gets its name from the fact that it is grown naturally without industrial agrochemicals such as fertilizers, pesticides, or transgenic techniques (Guerena and Sullivan 2003). Traditional chemicals including, herbicides, growth regulators, insecticides, and defoliants, are prohibited from being used for at least three years before organic cotton filed. It stimulates biodiversity, supports ecological processes, and protects human health and the environment (Rieple and Singh 2010). In contrast, cotton grown conventionally uses far too many pesticides and crop protecting chemicals, causing several environmental problems. Furthermore, since the danger of cancer has grown, customers are becoming more concerned about the raw materials used in end-products that do not include any chemical residues. Aside from the tremendous benefits, there are certain difficulties to overcome, such as the mechanical properties of organic cotton is inferior to standard cotton (Mahmud et al. 2020). For example, Sanches et al. (2014) reported knitted fabrics prepared from different natural/blend fibers, including organic cotton. They evaluated the pilling properties, elasticity, rupture pressure, moisture absorption, elongation, and dimensional stability. Results emphasized that the fabrics manufactured other than organic cotton displayed better performance. Chae et al. (2011) investigated the mechanical properties of organic cotton in terms of tactile sensory perceptions and compared it with other fibers. The report revealed that different fibers had substantial variations in surface, shear, compression characteristics, and weight. Thus, we are reporting here modifying organic cotton to impart natural color, increase bacterial resistance, and induce UV protection to create genuinely sustainable materials.

Like other traditional wet processing, nanomaterial assisted dying/finishing of textile is significantly influenced by several factors that require optimization, including the concentration of metal precursor, the concentration of reducing/stabilizing agent, the pH of the reaction bath, and the incubation time. One-factor-at-a-time is studied in the traditional optimization process while keeping all other conditions constant (Mahmud et al. 2017b, 2019). Consequently, this process does not evaluate cross-effects among the factors and leads to an insignificant optimization. While a process contains multiple factors, it is logical to adopt statistical-based optimization methods to achieve the aforementioned objects. A statistical-based experimental design is a modern technique; where all the variables or parameters were simultaneously studied in a specified range using a few experiments to acquire systematic outputs or signals for further analysis (Shafiq et al. 2018). The Taguchi design of experiment (DoE) is such a technique that can be used in process optimization and simultaneously in performance improvement (Morshed et al. 2020). Even the DoE can also rank the factors according to their contribution to process/product and development (Cai et al. 2020). To the best of our knowledge, no study has reported the statistical modeling and optimization of the dyeing and finishing process of organic cotton using natural dye mediated nanoparticles through a full factorial design.

Therefore, this study used an L16 orthogonal array of four parameters and four levels full factorial experimental design to optimize the dyeing and finishing process. Individual and interaction effects of incubation time, solution pH, and silver nitrated/gardenia yellow concentration were studied in statistical modeling. The responses (outputs) considered were the color strength (K/S value) and color differences (ΔE value) as an indication of successful coloration and functionalization of OCFs. In this Taguchi technique, a signal-to-noise ratio (S/N) was calculated to obtain optimal parameters from the response table for significance screening of the specific factor. Lately, a confirmation test has been deployed to validate the DoE concerning practical viability. The samples prepared based on the optimized conditions from the statistical results were structurally characterized to observe the morphological change caused by the deposition of AgNPs. Other important properties of synthesized AgNPs, such as crystal structure, particle size, homogeneity of distribution, and surface charge, were also studied. A mechanism of the ternary interaction among organic cotton, nanosilver, and plant phytochemicals was explored. Samples’ functionality in terms of UV protection and bacterial resistivity was evaluated using a recognized standard method.

Experimental

Materials

Certified bleached organic cotton fabrics (OCFs, 1/1 plain weave construction, weight density = 128 g/m2, and yarn density = 120 ends/inch and 70 picks/inch) were supplied by Henan Pingmian Textile Group Co., Ltd. (Pingdingshan, China). Silver nitrate (AgNO3) and sodium hydroxide (NaOH) in the analytical grade were purchased from Sinopharm Chemical Reagent Co., Ltd. (Shanghai, China) and used as received. The Gardenia fructus seeds were purchased from Huacaoyun Biotechnology Co., Ltd., Bozhou, Aihui, China.

Preparation of natural dyes (gardenia yellow)

According to the available method with minor modifications, the gardenia yellow was extracted from Gardeniae fructus seeds (Saravanakumar et al. 2018). In brief, the seeds were crushed at a rotation speed of approximately 10,000 rpm using a conventional pulverizer (IFM-800DG, Iwatani Corp., Japan) to prepare fine powder. About 10 g of as-prepared powder was dissolved in 250 mL of deionized water maintaining solution pH = 12 and boiled in an oscillator with water bath in constant temperature at 80 °C for 2 h to get a crude extract of gardenia yellow. Finally, the extract was filtered through Whatman No.1 filter paper, and then the filtrate was collected in a 250 mL Erlenmeyer flask and stored at room temperature for subsequent use.

AgNPs assisted dyeing/finishing of OCFs

Bleached OCFs (2.0 g) were immersed into a 250 mL Erlenmeyer flask containing a solution of 10 mM AgNO3 (10 mL) and deionized water (70 mL) for the adsorption and dispersion of Ag+. Natural dyes of 20 mL were induced to the flask with maintaining the pH = 8 (using hydrochloric acid) and heated the flax at 70 °C for 30 min. The OCF samples were washed with and without a non-ionic detergent (1 g/L) to remove the unfixed nano-ingredients with a materials-to-liquor ratio of 1:60 (w/v) at 50 °C for 10 min and then dried sufficiently at 60 °C in a thermostatic vacuum drier. The step-by-step functionalization via exhaust method is presented in the process curve (Scheme 1). Here, the resulting OCFs have been designated as ‘AgNP dyed OCFs’.

Scheme 1
scheme 1

The process curve of step-by-step OCF functionalization using nanosilver

Design of experiment (DoE)

The Taguchi design of experiments is an experimental setting used to analyze the impact of multiple factors of multiple levels to achieve an optimum output by employing a minimum number of trials (Pervez et al. 2018). Since we have used four levels of four control parameters (AgNO3 conc., solution pH, plant extract conc., and reaction time) (Table 1), an L16 orthogonal array of factors was chosen to obtain the maximum number of trials (Table 2). Finally, each trial's outputs (ΔE and K/S) were systematically analyzed using the signal-to-noise (S/N) ratio (Text S1: Supplementary Information), interaction plots, residual plots, confirmatory/validation test, and a response table. A Minitab 19 software was used to analyze and plot the data, according to Pervez et al. (2018).

Table 1 Parameters and their levels
Table 2 Experimental layout using L16 orthogonal array of factors, experimental data, and their S/N ratios

Characterization and measurement

The surface morphology of control and AgNP dyed OCFs were observed by scanning electron microscopy (SEM, JEOL 7800F, Tokyo, Japan). The elemental composition of AgNPs deposited on the OCFs surface was analyzed using energy-dispersive X-ray (EDX) equipped with SEM instruments. The InCA automated and mapping software was used for the initial data collection and image processing. The particle shape and size distribution of the AgNP dyed OCFs was observed by a transmission electron microscope (TEM, JEOL-JEM-2100F, Tokyo, Japan) at an accelerating voltage of 20 kV. The crystallinity phase of AgNP dyed OCFs was characterized by X-ray diffraction (XRD, Bruker D8 Advance Diffractometer, Bruker AXS, Germany) with Cu Kα radiation (k = 0.154 nm) in the range of 5°–80° (2θ) at 40 keV. Herein, AgNP dyed OCFs were put in a 50 ml glass bottle with 50 ml of water. The bottle was centrifuged at 6000 rpm for 30 min to enable enough time for the OCFs to leach AgNPs. The OCFs were then removed, and the residual water was squeezed out into a glass container. The AgNP-containing centrifuged water was used for the TEM and XRD analysis. The surface zeta potential and average size distribution of the particle (after extraction from AgNP dyed OCFs followed by solution extraction using centrifuge) were determined using Zetasizer (Nano-ZS90, Malvern Instruments, UK).

The color yield of the AgNP dyed OCFs in terms of CIE L*a*b* values and color strength (K/S) based on the Kubelka–Munk equation were evaluated by the light reflectance technique (Text S2: Supplementary Information). Colorfastness washing, light, and rubbing was determined according to the standard of ISO 105-C02 (1989), ISO 105-X12 (1987), and ISO 105-B02 (1988), respectively (Text S3: Supplementary Information). Antibacterial were performed using agar disk diffusion as described in Text S4: Supplementary Information. The UV transmission spectra of AgNP dyed OCFs were measured using a UV/Vis spectrophotometer (Analytikjena, Germany). The ultraviolet protection factor (UPF) values were automatically calculated using a Startek UV fabric protection application software (Startek Technology, version 3.0).

Result and discussion

Statistical modeling and optimization

AgNPs enhance the intensity and brilliance of colors on the substance without traditional dyes due to their localized surface plasmon resonance (LSPR) properties (Mahmud et al. 2017a). The photograph of the OCF samples before and after in-situ synthesis of AgNPs are showed in Fig. 1. It can be observed that the OCF sample color changed from off-white/grey to yellow due to the incorporation of AgNPs. The color strength (K/S) value is typically measured to understand the color content of the dyed materials (Pervez et al. 2017). Therefore, optimizing the K/S value of the AgNP dyed OCFs by adjusting the variable process parameters is ultimately the optimization of AgNP incorporation. Regarding the appearance of yellow shade, the K/S values were recorded at 425 nm wavelength. Similarly, the color difference (ΔE) for AgNP dyed OCFs is an effect of AgNPs on the color of OCFs samples. The ΔE values were measured according to the CIE Lab coordination system using a standard equation (Text S2: Supplementary Information). Increasing the ΔE values laterally increasing the AgNP deposition on the OCFs surface. Therefore, the optimization of ΔE values by studying variable process parameters was achieved as an indication of optimum AgNP incorporation on the OCFs surfaces.

Fig. 1
figure 1

Photographs of (a) control OCFs, (b) gardenia yellow treated OCFs and (b) gardenia yellow mediated AgNP dyed OCFs

An L16 orthogonal Taguchi design of experiment was used to achieve the optimum parameters for the highest outputs for ΔE and K/S values (Table 2). In this DoE, the S/N ratio was considered to measure desirable/non-desirable levels of the experiment. Since the outputs have a proportional correlation in terms of AgNPs on the OCFs, the ‘larger-the-better’ function (higher the response value, the better the outputs) was selected to estimate the optimum level. The optimal AgNP fixation with regard to the output was determined by the obtained results and subsequently used for delta statistic value (the difference between the highest mean value and the lowest mean value of a particular parameter) (Table 3). The calculated delta values are arranged in an arithmetic series beginning from rank 1 to rank N. The highest value indicates rank 1, and the lowest value indicates rank N in ascending order. Concerning the ΔE values (Table 3: a), the pH substantially influences the AgNP fixation; hence, it was denoted as rank 1. This was followed by reaction time, extract conc., and AgNO3 conc., contributed as rank 2, rank 3, and rank 4, respectively. Similarly, the delta statistical analysis regarding the K/S (Table 3: b) indicates that the reaction time has the highest influences (rank 1) on the AgNP fixation followed by the AgNO3 conc., the solution pH, and the extract conc.

Table 3 Response table for signal to noise (S/N) ratios: (a) ΔE and (b)K/S (larger is better)

The main effect plot produced by the S/N ratio defines the influence of the individual independent parameters on the dependent parameters across all levels (Fig. 2). The overall scenario of the factor’s impact on the process can be perceived by evaluating the main effects of the parameters (Shafiq et al. 2018). In Fig. 2a, the main effect plots for the S/N ratio (ΔE) show that the third level of AgNO3 conc. (A3), solution pH (B3), and extract conc. (C3), as well as the second level of reaction time (D2) revealed the optimum values of ΔE. Similarly, another main effect plot was produced for K/S values originated S/N ratios (Fig. 2b). It can be again observed that the third level of AgNO3 conc. (A3), solution pH (B3), and extract conc. (C3), and the second level of reaction time (D2) were revealed as optimum results of the K/S. Both plots are consistent with the S/N ratio analysis (Table 3), indicating that the same levels of the parameters (A3, B3, C3, and D2) are nominated for the highest AgNP fixation employing maximum ΔE and K/S values and referred to as optimized condition.

Fig. 2
figure 2

Main effect plots for S/N ratios, response: (a) ΔE and (b) K/S value (herein, signal-to-noise: larger is better)

The interaction plots are mainly produced to recognize the occurrence of interactions among variable process parameters (Cai et al. 2020). In such plots, the interactions are generally found by a set of parallel lines (weak/absence of relationships) or a set of non-parallel lines (presence of relationships) among process parameters for a given set of experimental arrays. The interaction plots for ΔE based S/N rations demonstrate that all four factors (A, B, C, and D) strongly intersect, i.e., a non-parallel nature of lines indicating the occurrence of a complex cross interaction among these four factors (Fig. 3a). Similar phenomena are also observed in the interaction plots for K/S value originated S/N rations (Fig. 3b). Cai et al. (2020) also observed identical characteristics in the interaction plots during the reactive dye fixation on ramie fiber in liquid ammonia. Collectively, it could be concluded that the designated factors had a significant impact on the AgNP fixation.

Fig. 3
figure 3

Interaction plots for S/N ratios: (a) ΔE and (b) K/S value

The residual plots are produced in the responses of ΔE and K/S values using their corresponding S/N ratios (Figure S1: Supplementary Information). Each plot is typically consisting of four components, including (i) normal probability plot, (ii) histogram, (iii) residuals vs. fitted values plot, and (iv) residuals vs. observation order. It is evident that the plots of normal probability are mostly linear for both responses, where almost all points are pointed on the line or around the line. Hence, it is inevitable that the errors are typically distributed during the fixation of AgNPs. The histogram bar chart further ensures this normal distribution. However, the residuals vs. fitted values plot demonstrates that the error points are almost equally dispersed in both the upper and lower portion of the zero lines, representing a constant variance significance. Likewise, the residuals vs. the observation order plot reveal that the error points are casually encountered around the zero-line. It indicates that the residuals depend on the AgNP fixation to analyze the pattern that influence the responses (ΔE and K/S). In summary, the responses expose that the residuals are in uniform distribution on both sides of the zero line, which implies that the results are mutually agreeable and do not require any additional investigation of the errors analysis (Hossain et al. 2021).

The regression equation was produced to perfectly estimate the predicted values based on the experimental design and then compared the predicted values with the observed/actual value (Morshed et al. 2020). Figure 4 displays the linear fitted plots of the predicted vs. actual value in response to ΔE and K/S. The plot indicates that the DoE was significant since the line is firmly fitted for the predicted vs. actual value in response to ΔE and K/S. In addition, the fitting rate constants (R2) were calculated to 98.4% and 91.2% with adjusted R2 of 98.3% and 91.7% in the response of ΔE and K/S, respectively. The values are thus in strong agreement with each other. Also, a p-value of 0.000 for both responses indicate a significant relationship between predicted and actual values.

Fig. 4
figure 4

Fitted lines for the actual and predicted values: (a) ΔE and (b) K/S value

Characterizations of AgNP treated OCFs

The reduction of silver ions and stabilization of AgNPs were achieved via the reduction and stabilization capability of plant phytochemicals. Herein, the gardenia yellow has played at least three roles: (i) gardenia phytochemicals can serve as reducing agents for the reduction of silver cation to neutral ion; (ii) after successful reduction, they keep the produced AgNPs stable by creating a thin layer of cladding over the particles; (iii) finally, the thin layer of cladding (of gardenia phytochemicals) over the particles serves as a bridging agent to bind the AgNPs on the OCFs surface. The potential mechanism of AgNP formation on OCFs is presented in Scheme 2. The concept was adapted from recently published articles regarding the in-situ green synthesis of AgNPs on cotton fibers using phytochemicals of other plants (Čuk et al. 2021). The heavy metal adsorption capability and physical stability are what lead to the adoption of silver cation (Ag+) by the cellulose surface while the OCFs are immerged in AgNO3 solution. Thereby, the Ag+ can be bound to cellulose structure by an ion–dipole interaction. Even if the cotton fabric is left in the AgNO3 solution for a few days, the nanoparticles will not form if the silver cation reduction process is not continued (Yazdanshenas and Shateri-Khalilabad 2012). To prove the concept, OCFs were immersed in AgNO3 solution (without gardenia extract) for 30 min at 70 °C; and it has yielded no visible color on the OCFs surface (Fig. 1), indicating the absence of AgNP formation. Whatever the technique employed for green synthesis, the macromolecules in the plant extract (such as polyphenols and flavonoids) are mainly responsible for controlling the generation and stabilization of AgNPs. Gardenia yellow also contains iridoids, carotenoids (crocins), monoterpenoids and their glycosides, flavonoids, organic acid esters, and sterols (Cai et al. 2015). Like other plant phytochemicals (Liu et al. 2020), these constituents are responsible for reducing Ag+ and stabilizing AgNPs. In this technique, water-soluble parts of gardenia yellow (e.g., D-glucose) were initially dispersed over the silver absorbed OCFs to form a ternary complex [OCFs–Ag(gardenia yellow)]+, and then further reaction with the OH¯ ions to form AgNPs by the reduction of silver cations through the oxidation to gluconic acid (Vasireddy et al. 2012). Moreover, successful fixation of AgNPs on the OCFs surface may be achieved in two ways. (1) Comparatively bigger AgNPs are entrapped inside the fibril/fiber network of the OCFs surface and then tightly attached to the fiber surface through molecular force generated by the thin layers of plant phytochemicals molecules over the particles (Hasan et al. 2020b). (2) Osmotic pressure penetrates the comparatively smaller AgNPs through the fiber-porous system and becomes entangled by the double network of plant phytochemicals (Hasan et al. 2020c). In summary, the hydroxyl or carbonyl groups on the surface of OCF can act as ligands and are capable of bonding with nanosilver. Similarly, organic groups in natural dye molecules also have the ability to interact with AgNPs. The growth of nanosilver seeds and their in-situ deposition and fixation on the OCFs are shown in Scheme 2. Although there were multiple ingredients of gardenia phytochemicals responsible for establishing the interaction between OCFs and AgNPs, as a most effective component (Tavaf et al. 2015), D-glucose has been shown to represent other components.

Scheme 2
scheme 2

Possible chemical reactions during in-situ synthesis of AgNPs on OCFs

The surface morphology of control OCFs and AgNP dyed OCFs samples were captured by a typical SEM instrument (Fig. 5b1–b2). It was observed that the surface of the control OCFs was very smooth when touched. However, the changes in the OCFs microscopic surface caused by the generation and immobilization of AgNPs were significant. The AgNP dyed OCFs demonstrate a somewhat rough and uneven surface due to the successful immobilization of AgNPs on the fiber surface. The surface also exhibits a compact coating with AgNPs clusters, proving that the AgNPs were loaded on the OCFs fiber. However, the process neither damages the structure of particles nor the fiber structure. The SEM-assisted EDX was used to investigate the fundamental information regarding the chemical composition of the AgNP deposited on the OCFs surface (Fig. 5a). The linear scanning revealed a clear presence of the Ag peak at 2.96 keV, representing that the Ag has been correctly recognized and exists in the OCFs surface. In addition, the visible color variance in the elemental mapping images further approves the presence of AgNPs with uniform distribution (Fig. 5c1–c6). Other band signals due to carbon, oxygen, nitrogen atoms, etc., are also found both in the mapping images and elemental line scan. They are revealed from the plant phytochemicals coating of the AgNPs and cellulose macromolecules (Hasan et al. 2020c). The XRD pattern of AgNPs was studied in the 2θ range of 30°–70° to evaluate the crystal structure (Fig. 6a). Successful synthesis and deposition of AgNPs on the OCF surface were evidenced by the presence of the 2θ peaks at 38.1, 44.3, 64.4, and 77.5 corresponding to reflections from the (111), (200), (220), and (311) crystallographic planes of silver with face-centered cubic (FFC) structure, respectively (PDF#04-0783). The intensity of the unsplit (111) peak was noted to be dominated one, indicating that the (111) is the primary orientation of AgNPs, followed by the (200), (220), and (311) facets. The average crystal size of the AgNPs was estimated to be around 16.08 nm using the Scherrer equation (Aladpoosh et al. 2014).

Fig. 5
figure 5

(a) EDX linear scanning, (b1b2) SEM images, and (c1c6) SEM-derived elemental mapping images

Fig. 6
figure 6

(a) XRD pattern, (b) particle size distribution, (c) zeta potential, and (d) TEM micrograph of AgNPs

The AgNP-containing centrifuged water was used for the XRD, TEM, DLS, and zeta potential analysis to understand the ultimate features of the individual nanoparticle on the OCF surface. According to the TEM observation, AgNPs were almost spherical in shape, uniform in size, the nominal level of aggregations, and the size does not exceed 14 nm (Fig. 6d). However, the DLS measurement revealed that the particles were narrow in distribution with an average of 22.5 ± 5.2 nm. It is worth pointing that the size measured by DLS is larger than the one by TEM. This is due to the difference of measuring principles between DLS and TEM. The size measured by DLS is the size of AgNPs plus the phytochemicals bounding to the surface of AgNPs, whereas the size measured by TEM is the size of bare AgNPs. Zeta potential (ZP) of the AgNPs was estimated to be −29.0 mV, indicating the excellent stability of particles without apparent aggregation. Electronegative functional groups in gardenia yellow are responsible for the negative ZP value, suggesting that plant phytochemicals uniformly covered the nanoparticles. Another research found that a stable nano-colloidal structure can be accomplished by controlling the ZP value between -30 mV and + 30 mV (Gengan et al. 2013). The negative charge on the nanoparticle surface in this range would produce a strong repulsive force (which prevents any van der Waals attraction) that prevents aggregation and sedimentation (Chen et al. 2020a).

Colorfastness of AgNP treated OCFs

Samples were prepared according to the as-obtained optimum condition and tested for colorfastness to explain the color properties of treated OCFs. It is worth pointing that the color of treated OCFs changes from grey/white to various degrees (shade) of yellow/brown by the optical properties of AgNPs. However, the dyeing of textile materials is not only imparting the color but also withstanding of imparted color under certain conditions. Hence, the withstanding of the imparted color on the OCF surface was evaluated by the colorfastness to washing (CFW), light (CFL), and rubbing (CFR). The results show that both CFW and CFL have a rating between 4 and 5, indicating ‘good’ color stability against wash and light, respectively. It suggests that the color of dyed OCFs is significantly withstanding the laundering and does not participate in photo-degradation while exposed to sunlight. Similarly, the CFR rating under dry and wet conditions was 3–4, indicating ‘average’ to ‘good’ color stability against rubbing conditions. As per the Chinese National Standards for Textiles, the overall ratings are acceptable and fulfill industrial requirements (Hasan et al. 2019). The durable interactions between phytochemicals cladding (over the particles) and the functional groups of OCFs (–OH, –COOH) were principally responsible for the good fastness properties. Thus, the recommended simple coloration method allows for the dyeing of OCFs with good fastness qualities without the need of additional chemicals such as binders, crosslinkers, or coating reagents.

UV resistant of AgNP treated OCFs

The UV protection of OCFs is determined by their structure, preparation process, dyes/pigments, the presence of finishing agents, etc. UV protection is measured using the ultraviolet protection factor (UPF), which can be defined as the ability of materials to block the solar ultraviolet radiation. This value is calculated by the mean percentage of UVA (320–400 nm) and UVB (290–320 nm). The values of UPF and transmittance of light percentage for UV (UVA and UVB) of different dyed OCFs are summarized in Table 4. The higher UPF value indicates better protection against UV radiation. The results showed that the UPF value of gardenia yellow-treated OCFs was 21.15, indicating nominal protection against UV radiation. It is evident that UV was frequently passed through OCFs and that their UV protection was inadequate. Indeed, the OCF dyed with gardenia-AgNP (1 mM) showed a UPF value of 42.45, indicating an excellent UV radiation blocking ability. With the increase of AgNP concentration in the OCFs, the gardenia-AgNP (2 mM) sample showed an increased UPF value, i.e., 48.50. According to the previous report, the UPF value of more than 40 and the UVA value of less than 5% is considered excellent protection against UV radiation (Shateri-Khalilabad et al. 2017). It means the result demonstrated for as-prepared samples provides outstanding UV protection. In addition, it is well known that the lower the transmittance percentage, the better the UV protection of fabrics. As shown in Table 4, the transmittance percentages of different UV regions show a reduced value due to the AgNP treatment of OCFs. It further indicates the UV blocking ability. This is possible for low transmittance of AgNP dyed OCFs due to LSPR characteristics and UV scattering for the large refractive index property of AgNPs (Gorenšek and Recelj 2007).

Table 4 UV protection properties of gardenia and gardenia-AgNP treated fabric

Antibacterial function of AgNP dyed OCFs

One of the primary objects of this study was to prepare antibacterial OCFs using in-situ synthesized AgNPs. Therefore, the antibacterial performances of the AgNP dyed OCFs were estimated against the gram-negative (E. coli) and gram-positive (S. aureus) bacteria. The bacterial inhibition efficiency was evaluated using zone of inhibition techniques, i.e., agar disk diffusion test. According to the test method, all samples were placed in bacteria inoculated agar plates after five washing cycles. The size for the zone of inhibition in the agar plate is shown in Fig. 7a–b. It is noticed that gardenia yellow treated OCFs show no evident inhibition zone against E. coli and S. aureus bacteria. Moreover, gardenia yellow alone cannot serve as an antibacterial agent for OCFs. On the contrary, the AgNP dyed OCFs showed a promising antibacterial efficiency for E. coli and S. aureus, where the zones of inhibition were 7.98 ± 0.79 mm and 10.08 ± 1.18 mm, respectively. Herein, S. aureus showed higher sensitivity to AgNPs than E. coil, and it mainly depends on the bacterial structure (including anatomy and physiology), metabolism, and interaction with AgNPs charged with different reducing/stabilizing molecules (Durán et al. 2016). It is worth mentioning that the inhibition zone is bigger than the diameter of the OCFs because AgNPs and Ag+ can migrate or diffuse through the agar hydrogel by the electrostatic attraction or the concentration gradient. From this point of view, we have tried these types of experiments to expect the anchoring of AgNPs on fiber, not only by the active groups on the surface of OCFs but also by the dye molecules. However, it was calculated (Text S2: Supplementary Information) to be more than 96% bacterial reduction for both bacterial strains, where 70% bacterial reduction is enough to meet the commercial standard of GB/T 20,944.3–2008 (Zhou et al. 2021). For further comparative analysis, gentamicin and ampicillin were used as a control for E. coli and S. aureus, respectively. As expected, gentamicin and ampicillin-treated OCFs showed a remarkable inhibition zone (i.e., 11.39 ± 0.38 mm and 13.23 ± 1.09 mm, respectively) and the results were very close to the AgNP dyed OCFs. It means the AgNP dyed OCFs have a competitive antibacterial function and meet the commercial standard requirements, which is desirable for practical applications. Several articles for AgNPs' antibacterial activities have been reported, but the exact mechanism is still unknown (Zhang et al. 2021). Based on the available literature, when the bacteria contact the AgNP dyed OCFs, the AgNPs or silver ions are released to attach to the bacterial cell membrane first and then penetrate inside the cells forming pits. Due to the superior sensitivity towards the oxygen (O2), the neutral silver ion (Ag0) was converted into silver cation (Ag+) by oxidation (Tian et al. 2020). Therefore, an electrostatic attraction can be achieved between the positive charge of silver and the negative charge of the microbial cell membrane. This interaction leads to the morphological changes of membrane structure. Then membrane depolarization occurred which causes disruptions of membrane permeability and respiratory functions. As a result, the cell membrane becomes damaged, and cell integrity is disrupted, and eventually, cell death happens. Another report has demonstrated that AgNPs can interact with the protein parts of the outer cell membrane. Then it makes complexes with oxygen, phosphorus, nitrogen, and sulfur atom and causes an irreversible change in the cell wall (Ghosh et al. 2012). The interaction of sulfur-containing membrane with AgNPs leads to the deactivation of bacterial growth (Lok et al. 2007). It also decreases the enzymatic activity of the respiratory chain of dehydrogenases in AgNP treated surface. Consequently, AgNPs damage the cell membrane, enter into the cell, and dehydrogenase the respiratory chain leading to cell death. (Roy et al. 2019). A mechanism of the bacterial effect of AgNP dyed OCFs against bacteria is proposed in Fig. 7c.

Fig. 7
figure 7

Photographs of agar plate showing the antibacterial effect of samples against (a) E. coli, (b) S. aureus, and (c) possible mechanism of antibacterial action of AgNP dyed OCFs: ① AgNPs released by OCFs, ② cell membrane damage, ③ inhibition of electron transport chain, ④ destabilization of ribosomes, ⑤ formation of ROS, ⑥ oxidative stress, ⑦ damage of DNA, ⑧ damage of protein, ⑨ dysfunction of mitochondria, and ⑩ cell death

Conclusion

A straightforward and cost-effective traditional heating technique is explored here for the coloration and simultaneous functionalization (bacterial resistance and UV protection) of OCFs via in-situ synthesis of AgNPs in natural dyes templet extracted from gardenia yellow. The Taguchi model was used for statistical analysis in terms of signal to noise (S/N) ratios, main effect plots, interaction plots, residual plots, and fitted line plots at four levels on double signals (K/S and ΔE value). Experiments were conducted under the predicted optimal conditions to affirm the validity of the findings, and the results were in proper alignment with the predicted response. The surface plasmon property of AgNP imparted brilliant color on OCFs with strong color strength and fastness. The molecular force developed by plant phytochemicals and its double networking phenomenon via chemical linkage had enabled the successful fixation of particles. The protocol is highly effective for simultaneous functionalization in terms of antibacterial action and UV protection. Overall, natural dye reduced in-situ AgNPs on the OCFs surface-induced significant color and multi-functionality, thus overcoming the drawbacks of the traditional dyeing and finishing process.