Introduction

Sustainability in terms of green chemistry is the term introduced in all walks of life (Rehman et al. 2021; Xia et al. 2021). This is because day-by-day rapid utilization of synthetic products, their effluent loads eluted either during synthesis or application, are disturbing the ecosystem (Tkaczyk et al. 2020; Verma et al. 2022). Their effluent contains such nonbiodegradable chemicals which are causing reducing in levels of chemical oxygen demand (COD), biological oxygen demand (BOD), optical density (OD), and suspended solids (SS) of the aqua ecosystem. When mixed with soil, the effluent is destroying the soil pH and bacterial activity of the soil, which in turn causing the destruction of agri-land (Jadhav and Jadhav 2021; Lellis et al. 2019; Yaseen and Scholz 2019). A lot of money, labor, energy, and time are being spent to treat such effluent load, but day by day, the rapid industrialization to provide the charm of life is causing the global heat and spreading various hazardous diseases for the global community. Now, for decades, the wonderful ray for eco-labeled green and sustainable products has been observed, where awareness about green products, their benefits, and applications in all fields has been spread (Adeel et al. 2020; Alam et al. 2020). The severe hazardous effects of synthetic products when studied by world environmental and global agencies have forced the industrialist, stakeholders, and traders to rush towards green products (Ali et al. 2019; Manzoor and Sharma 2020; Toprak and Anis 2017). Of such green products, plant-based functional isolates have great importance due to their antiviral, antioxidant, antibacterial, ayurvedic activities, and so on. Green products particularly natural dyes isolated from plants have unique characteristics (Aryal et al. 2021; Joshi et al. 2020; Patel et al. 2021). Natural dyes are easily treatable and have no effluent load and being harmonized with nature have excellent medicinal properties (Samsami et al. 2020; Ledakowicz and Paździor 2021). Even the wastes of the plant, after the isolation of the natural dye, when mixed with the soil can act as fertilizer (Aggarwal 2021; Haerudin et al. 2020). The colorants cover a full spectrum of colors and have excellent compatibility with the fabric and the environment. Mostly, the plants which bear natural dyes are part of great ayurvedic systems, such as Chinese, Greek, and Indian medicine systems (Bhandari et al. 2020; Mansour and Yusuf 2018; Loum et al. 2021). In this study, Esfand seeds (Peganum harmala) have been selected as a dye-yielding source. The plant being a member of the family Nitrariaceaes contains excellent biological activities (Abderrahman et al. 2018; Shahrajabian et al. 2021). Its extract contains alkaloids that act as a colorant. The colorant isolated from Harmal seeds is used for ink making, tattoos, and an alternative to Turkey red (TR) color. It is also used to dye wool, silk, cotton, and so on. Silk is a natural polymer that consists of fibroin as a major part (Adeelet al. 2018; Haji 2019). Fibroin is the main functional part of silk where the amido linkage (functional unit) interacts with dye to give a beautiful tint. Studies reveal that plant-derived colorants are obtained less in amount, and even their application yields a low fastness rating (Haji and Naebe 2020; Silva et al. 2020). Conventional methods such as heating, stirring, and soaking are used, but these methods yield less colorant amount and consume a lot of energy solvent and time (Helmy 2020; Rodsamran and Sothornvit 2019). For fabric uptake ability, processing such as mercerization, bio-polishing, and cationization are used, but the fabric uptake ability is less (Adeel et al. 2021a). Now, modern methods have been found, where isolation under ultrasonic (U.S.) rays is a clean and green process that serves as the most convenient and energy-saving modern method. These rays (U.S.) speed up the extraction and dyeing process and are considered as one of the most efficient and energy-conservative methods. Ultrasonic irradiation enhances the diffusion rate of dyes into textile material and improves dyeing rates via cavitation to give better results (Fadil et al. 2021). The benefit of using U.S. energy in textile dyeing is that these leveled heating rays increase the absorption uptake of dyeing material by fabrics showing the sonication ability in dyeing at very low temperatures (Baig et al. 2020; Kumar et al. 2020). Hence, this treatment in textile dyeing is being employed nowadays because these rays provide a cleaner, greener, uniform, and heat-effective energy source to rupture plant cell walls for making effective solid–liquid interaction to isolate potential biomolecules used for the coloration process (Mart´ınez-Ramos et al. 2020). To improve colorfastness, chemical anchors are used, but the salts of Co+2, Cu+2, Cr+2, Ni+2, and so on are toxic (Hosseinnezhad et al. 2021). Now, the biological mordants have been introduced such as the extracts of cumin, elaichi, neem that have such phenolics when interact with the fabric before, after & during dyeing, not only provide new tint but also enhance color characteristics in term of shade quality (Lab values). Keeping the whole scenario in mind, for the current study, U.S. rays as an isolation tool to get high colorant yield and plant-based isolates as bio-mordants for dyeing silk using Harmal seeds have been selected.

The current study aims to improve the isolation yield of colorants using U.S. rays in a suitable medium, optimize dyeing variables using response surface methodology as a statistical tool, and employ plant-based phenolic for improving color characteristics.

Collection of materials

Esfand seeds (P. harmala) procured were washed with tap water, dried under shade, and ground finely to get crude powder. The ground seeds powder after sieving up to 20 mesh were stored to use for colorant isolation. Silk fabric (pre-treated, 20 GSM) was made ready for dyeing by boiling with neutral soap. Plant materials acting as bio-mordants procured were also treated in the same way as discussed earlier.

Isolation process

Esfand seeds contain alkaloids which act as a colorant to give yellowish color onto fabric. For the isolation process, aqueous, acidic, and organic (methanolic) media have been used by boiling the mixture at given conditions, keeping fine powder to a medium ratio (FP: M) of 1:25 (Adeel et al. 2021a). To make the extraction process greener and sustainable, ultrasonic radiation was employed. For this purpose, extraction was carried under ultrasonic (US) treatment for 15–60 min at 60°C using an ultrasonic bath (Rohs U.S. bath). U.S. irradiated (RS) and unirradiated silk fabrics (NRS) were dyed at 65°C for 55 min using U.S. irradiated (RE) and unirradiated extracts (NRE). The detailed experiments have been narrated in Table 1.

Table 1 Ultrasonic-assisted extraction and dyeing conditions for coloration of silk fabric from Esfand (P. harmala) seeds

Optimization of dyeing and mordanting conditions

After getting the optimal irradiated condition, dyeing levels were determined through response surface methodology as a statistical approach (Table 2). For this purpose, the optimization of dyeing temperature and time as contact levels were carried out at 50–80°C for 25–65 min. In another experimental series, the 15–55 mL of aqueous extract was employed, and depending upon the nature of the fabric, dyeing was performed using optimal extracts of 4–7 pH. For getting maximum uptake ability of dye bath, 1–5g/100 mL of table salt as the exhausting agent was employed. The extracts of turmeric (Curcuma longa), zeera (Cuminum cyminum), neem (Azadirachta indica), and elaichi (Elettaria cardamomum) were also employed at given conditions to improve the coloring properties of silk dyed with harmal seed extracts. The extract of bio-mordants was prepared by following the already documented methods of Adeel et al. (2021a) and Habib et al. (2021).

Table 2 Optimization of dyeing parameters for silk using irradiated acidic extract from Esfand (P. harmala) seeds through response Surface methodology (RSM)

Analysis of results and fabrics

Two-way ANOVA as the statistical tool was employed for statistical analysis of extraction conditions. For optimization of dyeing conditions, response surface methodology as the statistical tool was also used to find optimum dyeing levels. Color strength (K/S) of all dyed fabrics and shade quality parameters (L*, a*, b*) were observed using Kubelka–Munk equation (K/S = (1 − R)2/2R) programmed in Spectra Flash SF 600 (Data Color; USA) at Department of Chemistry Government College University Faisalabad.

Results and discussion

The environmentally friendly isolation tools have been always welcomed due to their excellent mass transfer nature into a solvent with the utilization of less cost, energy, and time. Of these tools are ultrasonic rays which, via mechanical action, transfer energy into the solvent to rupture plant cell wall for the evolution of plant potent isolate (natural dye) (Borrás-Enríquez et al. 2021; Fadil et al. 2021). In this study, Esfand (P. harmala) has been explored under U.S. rays up to 60 min by the application of aqueous, acidic, and organic solvent. It has been found that isolation of colorant in an aqueous medium followed by dyeing (UAD) under U.S. rays for 30 min has given excellent results (Fig. 1a). Upon changing the nature of the isolation medium, it has been found that acidic extraction (Fig. 1b) did not give any significant results. Hence, unirradiated acidic extract (NRE) has given better colorant yield (K/S) onto unirradiated silk fabric (NRS). But the organic medium has given excellent color yield (Fig. 1c) onto unirradiated silk fabric (NRS) when exposed to U.S. treatment for 45 min. Comparatively, the acidic extract has given excellent colorant yield onto silk fabric (RS).

Fig. 1
figure 1

a Effect of ultrasonic radiations on the aqueous extraction of alkaloids from Esfand (P. harmala) seeds for silk dyeing. b Effect of ultrasonic radiations on the acidic extraction of alkaloids from Esfand (P. harmala) seeds for silk dyeing. c Effect of ultrasonic radiations on the methanolic extraction of alkaloids from Esfand (P. harmala) seeds for silk dyeing

The color coordinates given in Table 3 reveal that most of the samples are more brighter redder and more yellower in hue, but the optimum fabric dyed after U.S. exposure up to 30 min has given brighter shades with a yellowish red tone (L* = 73.33; a* = 7.78; b* = 18.89). Similarly, the acidic extract has also given a brighter shade with more redder and more yellowish tone (L* = 73.10; a* = 8.21; b* = 19.32), whereas the methanolic extract has also given brighter tint with reddish-yellow hue (L* = 72.21; a* = 7.75; b* = 17.71).

Table 3 The color coordinates values using ultrasonic-assisted extraction conditions for coloration of silk fabric from P. harmala seeds

Dyeing parameters are always used to determine the permanency of color onto fabric (Adeel et al. 2018; Haji 2019). In this study, using optimum extracts and irradiation conditions, a set of 32 experiments have been conducted to find the efficacy of optimum parameters onto the dyeing of the silk with Harmal extract. Low temperature does not enhance the kinetics of dye bath, whereas too high temperature may shift the equilibrium of dye bath from fabric to bath. In both cases, dye mainly remains onto fabric, which after washing is easily removed and low tint strength is observed (Zuber et al. 2019). Similarly, contact time is also another important factor where low contact time has given less color depth and too much contact time favors desorption. Hence, dyeing of silk at 70°C for 45 min has given excellent results.

The other important thing is the pH of the dye bath, as mostly the silk is dyed in an acidic medium, but here, owing to the nature of colorant (alkaloids), a dye bath of neutral level (pH = 7) has been selected to get maximum color depth. It has been found that 35 mL of dye bath after U.S. treatment for 30 min has also given excellent results, where it contains 3 g/100 mL of salt as an exhausting agent. Hence, overall, it can be seen that statistically, the reduction in dyeing level shows that U.S. treatment to Harmal extract used for dyeing of silk is cost energy and time effective in nature (Adeel et al. 2021b; Ranjha et al. 2021). The data presented in Tables 4 and 5 reveals that most of the fabric dyed shows brighter shades with a more reddish-yellow hue, but the optimum fabric dyed at 70°C for 45 min using 35 mL of U.S. treated dye bath of 7 pH containing 3 g/100 mL of salt is brighter (L* = 78.59) in the shade and less redder (a* = 5.47) but much more yellower (b* = 41.85) in tone. Statistically, it can also be seen from Tables 4 and 5 that the effect of temperature along with time, pH, and salt is significant (p = 0.001, 0.002, 0.004, 0.014), where the effect of time is also significant as well as the effect of neutral dye bath (pH = 7; p = 0.000) at given volume and salt amount. Hence, overall, the selection of optimum parameters is also statistically valid for getting acceptable results (Fig. 2a–c).

Table 4 Comparative two-way ANOVA analysis of dyeing parameters for silk coloration using Esfand extract
Table 5 Statistical analysis for the effect of optimization of dyeing parameters
Fig. 2
figure 2figure 2

a Graphical representation of two-way ANOVA analysis of P. harmala; K/S versus salt, pH, temperature, and time, using response surface regression. b Graphical representation of two-way ANOVA analysis of P. harmala ; K/S versus volume, pH, temperature, time, using response surface regression. c Graphical representation of two-way ANOVA analysis of P. harmala; K/S versus, pH, time, and temperature, using response surface regression

The dyeing of natural fabrics using plant colorants always needs the bridging agent called anchors to form a strong, fast, and firm interaction of colorant with fabric. Usually, metallic salts such as salts of Al+3, Fe2+, Cu2+, Cr+3, Co2+, and tannic acid or cream of tartar are used. But salts of Cr+3, Cu2+, Co2+, and so on are found to be carcinogenic and need replacement. In this study, plant extracts as an alternative to chemical anchors have been used. Since last decades, their utilization has gained fame, because these mordants not only alter the shade of fabric before, after, and during dyeing but also impart their excellent biological characteristics along with good to excellent fastness characteristics. The results given in Fig. 3a–c show that 10% of elaichi, 5% of neem, 3% of turmeric, and 1% of zeera extracts have given high color strength when employed before dyeing (pre-mordanting). The application of 9% of elaichi, 10% of neem, 7% of turmeric, and 7% of zeera extracts after dyeing (post-mordanting) has given good color strength. Similarly, during dyeing (meta-mordanting), the application of 9% of elaichi, 9% of neem, 5% of turmeric, and 7% of zeera extracts has given excellent results. This good color strength is due to the formation of H-bonding between the –OH of colorant and amido linkage (–NHCO–) of fabric and –OH of the mordant (Arifeen et al. 2021; Khan et al. 2021). The proposed interaction of bio-mordanted silk fabric has been displayed in Fig. 4.

Fig. 3
figure 3

a Effect of Bio pre-mordanting on the color strength of silk using optimized dye extract from Esfand (P. harmala). b Effect of Bio post-mordanting on the color strength of silk using optimized dye extract from Esfand (P. harmala). c Effect of bio meta-mordanting on the color strength of silk using optimized dye extract from Esfand (P. harmala)

Fig. 4
figure 4

Proposed interaction of bio-mordanted silk with colorant of Esfand (P. harmala)

This additional bonding along with the addition of conjugation by flavonoids of bio-mordants has added valorization in the tinting of dyed fabric (Hosseinnezhad et al. 2021; İşmal and Yıldırım 2019). However, the mode of application (pre-, post-, and meta-mordants) has been found to vary in giving darkness or brightness of shade as well as reddish-yellow tone. As Harmal in previous cases has been found to give reddish-yellow tones, so here again, it can be seen that yellowish-red tone has been enhanced (Adeel et al. 2018). Hence, it is recommended that for getting excellent shade quality, 3% turmeric as pre, 7% turmeric as post, and 5% turmeric as meta-mordanting should be used during dyeing of silk with acidic solubilized Harmal seeds extract at selected conditions. The color coordinates given in Table 6 reveal that using bio-mordants mostly dyed fabrics have produced more brighter shades with more reddish-yellow hues, but among all bio-mordants used, the application of turmeric extract has given optimal color strength. Therefore, the application of 3% of turmeric extract before (pre) dyeing has exhibited a more brighter (L* = 76.3) shade with less redder (a* = 1.87) but more yellower (b* = 75.25) hue, whereas fabric dyed after (post) the application of 7% of turmeric extracts exhibits more brighter shade, with less redder but more yellower tint (L* = 77.94; a* = 3.07; b* = 80.17). Utilization of 5% of turmeric extract during (meta) dyeing has displayed more brighter shade having redder and much more yellower tone, respectively (L* = 75.91; a* = 4.9; b* = 81.54). Overall, it has been investigated that the application of 5% of turmeric extract during dyeing has given excellent color strength with a brighter shade of reddish-yellow hue.

Table 6 Color coordinates of silk fabrics dyed with ultrasonic treated P. harmala extract before, after, and during bio-mordanting

The results given in Table 6 revealed that using optimum conditions, the particular amount of bio-mordants has not only given good color characteristics onto silk fabric. This is because the extra bonding formed through utilization of plant-based anchors (bio-mordants) and the conjugation present in the functional molecules of bio-mordants has also played their role in giving firm shade which in turn has resisted a lot to detach from the fabric (Hosen et al. 2021). Therefore, the utilization of the bio-mordants and the presence of curcumin in turmeric, cumin aldehyde in cumin, flavonoid in elaichi, and tannin in neem bark have contributed a lot in developing new shades, with good color characteristics. Thus, bio-mordanting has imparted more promising results under the influences of ultrasonic radiation. Hence, it is observed that ultrasonic irradiation has good efficacy to explore the coloring potential of natural dye isolated from Esfand (P. harmala) for silk dyeing under reduced conditions.

Conclusion

In the current pandemic scenario, the need for natural products having excellent biological characteristics particularly antiviral and antibacterial in nature is the need of current time for the global community. Of these products, Esfand (P. harmala) is an excellent antiviral plant with better coloring potential for textiles. The addition of U.S. rays as a green and sustainable extraction tool for phytoactive component (colorant) and the inclusion of bio-molecules as bio-mordants as an alternative to their synthetic counterparts (chemical mordants) have not only made the process more eco-friendly but also soothing, ayurvedic, and attractive for global community. In this study, the seeds of Harmal as source of natural yellow colorant have been explored under U.S. treatment, and new shades with good color characteristics have been developed using the optimum amount of bio-mordants followed by dyeing of silk under reduced conditions. Statistical optimization of results reveals that irradiation of extract and fabric and influence of dyeing parameters on shade development process using optimum conditions has been found significant. Hence, U.S. rays have an excellent potential to isolate the colorant from new dye-yielding plants and also can reduce the dyeing levels and mordant concentrations. For future studies the physico-chemical studies of fabric mordanted before & after dyeing will be conducted using SEM, TEM, AFM & FTIR tools, whereas for comparative analysis ISO, ASTM standards for fastness should be employed for observing shade permeance & its chemistry.