Introduction

The amount of dye wastewater produced by several large businesses, including textiles, clothing, printing, leather processing, and food, has increased in recent years (Amellal et al. 2024). Each year, the discharged dyes reach 60,000 tons into the environment worldwide via waste streams and industrial wastewater (Mouhtady et al. 2022). The release of these rich-dye effluents into aquatic bodies poses a serious threat to aquatic life, and causes numerous environmental issues due to their toxic, mutagenic and carcinogenic effects, high stability, and resistance to biodegradation (Qurrat-ul-Ain et al. 2019; Ben Arfi et al. 2022). Organic dyes are classified according to their ionic charge and characteristics as cationic, anionic, and nonionic dyes. Methyl green, a triphenylmethane dicationic color, is highly poisonous dye (Abegunde et al. 2024). It is used in biology and medicine to stain and as a photochromophore to sensitize coagulated films. It is also used for coloring purposes in textile paper, textile, leather, food, and cosmetic industries (Rouibah et al. 2023; Abegunde et al. 2024). As a result, it is vital to remove these dyes before they enter the main water stream. The chemical structure of methyl green is shown in Fig. 1.

Fig. 1
figure 1

Methyl green (MG) dye molecular structure

To address this serious issue, a variety of physical, chemical, and biological treatment methods have been developed (Karoui et al. 2021). Adsorption, among these technologies, has piqued researchers’ interest and is widely recommended due to its numerous benefits, including simplicity in design and operation, cost effectiveness, high efficiency, and the high-quality treated effluents (Maaloul et al. 2021a; Shin et al. 2022; Ben Arfi and Ghorbal 2024).

The search for a sustainable and efficient chemical-based solution for the elimination of a wide variety of dye contaminants is the initiative behind this work. As a result, it is critical to find an alternative efficient, low-cost, natural, and plentiful adsorbent for MG dye removal from aqueous solutions such as agricultural products. Agricultural materials are possible sustainable adsorbents since they are abundant, inexpensive, renewable, easy functionalized, and require few or no treatment before use (Liu et al. 2015; Ben Arfi et al. 2017; Kainth et al. 2024).

The removal of methyl green (MG) dye from aqueous solutions has been a subject of intense investigation in recent years, with various adsorbent materials being explored for their efficacy in this process. Alalwan et al. (2021) utilized eggshell waste and observed a maximum removal efficiency of 69.38 ± 3%, highlighting the influence of parameters such as pH, agitation speed, and contact duration on the adsorption process. Tanaydin and Goksu (2021) employed almond shell waste, optimizing the adsorption conditions using response surface methodology, achieving limited adsorption capacity of 1.1 mg/g. Ansari et al. (2022) developed a chitosan/Fe2O3/NiFe2O3 solid-phase adsorbent, demonstrating exceptional removal efficiency of 96.51% and an adsorption capacity of 77.22 mg/g under specific conditions. Bashandeh et al. (2022) introduced a modified epichlorohydrin chitosan Schiff base, achieving a remarkable removal efficiency of 99.12% and a high sorption potential of 194.4 mg/g. Alorabi and Azizi (2023) enhanced Dodonaea viscosa plant residue as a biosorbent, with optimized conditions yielding efficient MG adsorption. Lastly, Abegunde et al. (2024) synthesized ZnO nanoparticles using a green approach, exhibiting a removal efficiency of 99.96% and an adsorbent quantity of 478 mg/g under specific conditions.

Citrullus colocynthis is a perennial herbaceous plant belonging to the Cucurbitaceae family. It is commonly grown in the sandy and arid regions of west Asia, Australia, India, Africa and the Mediterranean region (Al-Qahtani 2023). This plant contains a variety of secondary metabolites including flavonoids, proteins, alkaloids, tannins, saponins, terpenoids, glycosides, steroids, and cucurbitacins (Li et al. 2022) as well as cellulose, hemicellulose, and lignin which have been linked to a variety of biological activities namely antioxidant, antimicrobial, and anti-inflammatory, anti-diabetic, anthelmintic, analgesic, anti-allergic, and anti-cancer properties (Khan et al. 2023). When Citrullus colocynthis was identified as an adsorbent for removing organic dyes in numerous earlier investigations, it was found that the raw material’s adsorption capability was lower than that of its chemically modified forms (Basharat et al. 2021; Alghamdi and El Mannoubi 2021). To enhance the adsorption capacity and improve the surface area attributes, physical or chemical activation should be undertaken.

Based on the above literature, the current study attempted to assess for the first time the ability of H2O2/NaOH chemically activated biosorbent generated from Citrullus colocynthis seeds to adsorb methyl green dye adopting batch adsorption system mode. Before and after the adsorption process, the biosorbent material was characterized by BET analysis (to estimate surface area), FTIR, SEM–EDX, and TGA analysis. The key process parameters studied were dye solution pH, adsorbent mass, MG concentration, and temperature. Furthermore, typical isotherm and kinetic models were studied to determine the best model for fitting the experimental results and to understand the adsorption mechanism in terms of adsorbate–adsorbent interactions. Thermodynamic parameters were also measured to better understand the biosorption process.

Materials and methods

Chemicals

Methyl green, malachite green, methylene blue, crystal violet, hydrogen peroxide (H2O2), sodium hydroxide (NaOH), and hydrochloric acid (HCl) were purchased from Sigma-Aldrich (Germany).

Activated biosorbent preparation

The Citrullus colocynthis fruits were collected from Al-Aqiq region, Al-Baha province (November 2022), a south-west region of the Kingdom of Saudi Arabia. Before air drying, the fruits were properly cleansed with distilled water to eliminate any dust or unwanted particles that had stuck to them. After drying, the Citrullus colocynthis seeds (CCSs) were separated and dried in the oven at 50 ºC for about 24 h before being crushed. Then they were subjected to the following chemical treatment: first, 50 g of grounded CCSs were treated with 1L of 1 M hydrogen peroxide at room temperature until the hydrogen peroxide was completely degraded (where there was no further gas evolution). The material was then rinsed with distilled water and filtered. The obtained residue was then soaked in 0.5 L of 1 M NaOH for 24 h before being rinsed repeatedly with distilled water to achieve neutral pH and filtered. Finally, the activated CCSs (ACCSs) sample was dried at 50 °C overnight to preserve the quantity of free –OH groups. It was then sieved to 600 µm particle size and stored in a desiccator for further use (Scheme 1).

Scheme1
scheme 1

Schematic representation of the ACCSs adsorbent preparation

Characterization

ACCSs’ point of zero charge (pHPZC) was determined using the solid addition method as described by Rejeb et al. (2019). Briefly, 0.10 g of ACCSs were mixed with 50 mL of 0.01 M NaCl solution. The original pH was adjusted between 2 to 12 by adding either 0.1 M HCl and/or NaOH solution at a temperature of 293 K for 24 h. The final pH was determined by Accumet AP85 pH meter (Thermo Fisher Scientific, USA). The pHPZC value was estimated by plotting the graph ΔpH (pHf–pHi) versus pHi, considering the intersection point between the curve and the baseline. The specific surface area of the samples was checked by the N2-BET (Nitrogen—Brunauer Emmett–Teller) adsorption test using a multi-point surface area analyzer (Nova1200e, Quantachrome, USA). The morphology of samples was illustrated using scanning electron microscopy equipped with energy dispersive X-ray (SEM–EDX, Model: TescanVEGA3, Germany) under an accelerating voltage of 20.0 kV and a working distance of 10 mm. The SEM images were magnified 500 and 1500 times. The presence of functional groups was identified using a Spectrum Two FTIR spectrophotometer (Perkin Elmer, USA) with a pyroelectric deuterated glycine sulfate (DTGS) detector, in the attenuated total reflection (ATR) mode. The samples were recorded in the 4000–450 cm−1 wave number range, with a spectral resolution of 2 cm−1. Thermogravimetric measurements (TGA) were carried out using Shimadzu thermogravimetric analyzer (DTG -60 H, Japan) adopting an inert environment (N2, gas) and a heating rate of 10 °C/min. The samples were heated from 298.15 °C to 1073.15 K. The amounts of the analyzed samples CCSs and ACCSs were approximately 12.091 and 8.528 mg, respectively.

Adsorbate

MG was used as a model dye molecule for the adsorption processes. A stock solution of 1000 mg/L was prepared by dissolving 1 g of MG dye powder in 1 L of distilled water. The required standard solutions were obtained by dilution method. The absorbencies of 30 mg/L MG solution were measured using UV–Vis single beam spectrophotometer (PD 303S, APEL, Japan) at different wavelengths in the range of 325 to 750 nm. The maximum absorbance was determined at 632 nm.

Batch adsorption tests

The batch adsorption experiments used 50 mL of MG dye solution in a shaking incubator at a constant agitation speed of 150 rpm and at room temperature. For pH effects, a range of 3–10 was selected. 0.015 g of adsorbents were added to 50 mg/L dye solution for 24 h. Prior to adding the adsorbent, the solution pH was adjusted with 0.1 M HCl or 0.1 M NaOH. The adsorbent mass was studied by selecting a range of 0.005 g to 0.4 g of adsorbents, added to 50 mg/L dye solutions for 24 h. Temperature investigations were performed at 298, 313, and 328 K with 0.02 g of adsorbents added to 50 mg/L dye solution for 300 min. At the end of each adsorption process, the samples were centrifuged and the absorbance of MG dye in the supernatant was determined at 632 nm using a UV–visible spectrophotometer. The residual concentration of MG stain was calculated using the calibration curve equation (A = 0.041 × C – 0.013, R2 = 0.999). The removal efficiency R (%) and the equilibrium adsorption capacity qe (mg/g) of MG adsorbed were calculated using formulas (1) and (2).

$$R(\% ) = \frac{{C_{i} - C_{e} }}{{C_{i} }} \times 100$$
(1)
$$q_{e} = \frac{(Ci - Ce)}{m} \times V$$
(2)

where Ci and Ce are the initial and equilibrium MG dye concentrations (mg/L), m is the mass of the adsorbent (g) and V is the volume of dye aqueous solution (L). All experiments were conducted in triplicate, and the mean values were reported.

Adsorption kinetics

Kinetic models are used to determine the adsorption rate and to provide information about the adsorption mechanism and the mass transfer of solutes on the adsorbent surface (Boubaker et al. 2021, 2024). Several kinetic models were used to estimate the itemized aspects of the adsorption process. Adsorption kinetic constants were calculated, and the linear regression correlation coefficient (R2) values were evaluated to choose the best suited model. In the present work, Lagergren’s pseudo-first-order model (PFO) and Ho’s pseudo-second-order model (PSO) were adopted.

Equations (3) and (4) present the linear expressions of the PFO and PSO, respectively.

$$ln(q_{e} - q_{t} ) = lnq_{e} - K_{1} t$$
(3)
$$\frac{t}{{q_{1} }} = \frac{1}{{k_{2} q_{e}^{2} }} + \frac{1}{{q_{e} }}t$$
(4)

where qe and qt are the adsorption capacities (mg g−1) at equilibrium and any time t (min), respectively, k1 (min−1) is the rate constant for the PFO adsorption process, and k2 (g mg−1 min−1) is the rate constant for the PSO adsorption process (Ben Nasr and Ghorbal 2021).

Adsorption isotherms

Adsorption isotherms are extremely useful for understanding the adsorption mechanism and quantifying the distribution of the adsorbate across the liquid and solid adsorbent phases when the adsorption process reaches equilibrium (Maaloul et al. 2021b). The adsorption isotherms are mathematical equations that represent the relationship between the adsorbent loading capacity and the adsorbate concentration in the liquid phase at a specific temperature when the equilibrium has been attained (Amrutha et al. 2023). There are several isotherm equations that can be used to examine equilibrium data. Langmuir, Freundlich, and Dubinin–Radushkevich equations, three commonly used adsorption models, were used in this investigation. Regression methods are commonly employed to determine the coefficients of the isotherm equations.

The Langmuir isotherm model is based on a monolayer adsorption process taking place on a homogenous adsorbent surface. This model assumes no interaction between adsorbed molecules at adjacent adsorption sites. The linearized form of the Langmuir equation is stated as Eq. (5):

$$\frac{{C_{e} }}{{q_{e} }} = \frac{1}{{q_{m} K_{L} }} + \frac{{C_{e} }}{{q_{m} }}$$
(5)

where qe is the equilibrium adsorbent-phase concentration of adsorbate (mg/g); Ce is the equilibrium aqueous-phase concentration of adsorbate (mg/L). qm is the maximum adsorption capacity (mg/g) and KL is the Langmuir constant (L/mg) related to the free adsorption energy. The values of qm and KL were calculated from the intercept and the slope of the Langmuir plot of Ce/qe versus Ce (Widiartyasari Prihatdini et al. 2023).

The Freundlich isotherm model is an empirical equation describing a multilayer adsorption process that takes place on a heterogeneous surface. The linearized form of Freundlich equation is expressed by Eq. (6):

$$\ln q_{e} = \ln K_{f} + \frac{1}{n}\ln C_{e}$$
(6)

where Kf (mg g−1) (L g−1)1/n and n are Freundlich constants for adsorption capacity and intensity, respectively. The slope and intercept of the Freundlich plot of lnqe against lnCe yielded the values of lnKf and 1/n, respectively (Khalfaoui et al. 2024).

The Dubinin–Radushkevich isotherm model was developed to account for the impact of the adsorbent porosity and a heterogeneous surface. It was based on the adsorption potential theory and assumed that the adsorption process used a micropore volume filling mechanism. The linear form of this isotherm model is given by Eq. (7):

$$lnq_{e}=\ln q_{s}-\beta\times\in^{2}$$
(7)

where qs(mg/g) is the theoretical isotherm saturation capacity, β (mol2/kJ2) is a constant related to the adsorption mean free energy per mole of adsorbate, and ɛ (kJ mol−1) is the adsorption potential. The constants β and qs can be obtained by plotting ln(qe) against ε2 (Güneş 2023).

Thermodynamic investigation

The thermodynamic parameters standard Gibbs free energy change (ΔGº, kJ mol−1), the standard enthalpy change (ΔHº, kJ mol−1), and standard entropy change (ΔSº, J K−1 mol−1) can be used to assess the spontaneity of the biosorption process. The studies were carried out at various MG starting concentrations ranging from 0 to 120 mg/L at three temperatures: 298—313—328 K. The thermodynamic parameters listed above were evaluated using the equations below:

$$\Delta G^{^\circ } = - RT\ln K_{d}$$
(8)
$$\ln K_{d} = \frac{{ - \Delta H^{^\circ } }}{RT} + \frac{{\Delta S^{^\circ } }}{R}$$
(9)

where kd = qe/Ce is the equilibrium adsorption constant. The values of entropy (ΔH0) and enthalpy (ΔS0) can be deduced from the slope and intercept of the linear graph of Vant’Hoff (lnKd versus 1/T) (Handayani et al. 2024).

Results and discussion

Characterization of the adsorbent

Surface area

Table 1 shows the BET surface area and other porosity parameters of raw and the activated adsorbents (CCSs and ACCSs, respectively). The BET surface area, pore volume, and the pore diameter of the ACCSs sample were found to be: 89.741 m2/g, 0.0936 cc/g, and 2.086 nm, respectively. The surface modification method used resulted in a significant increase in the specific surface area of the ACCSs biosorbent when compared to the results previously reported by Alghamdi and El Mannoubi (2021), who found the surface area, pore volume, and pore diameter of the untreated CCSs to be: 24.6794 m2/g, 0.023 cc/g, and 1.490 nm, respectively. According to the IUPAC classification, ACCSs are generally mesoporous materials that have porosity within the mesopore range (2—50 nm) which considerably increases the specific surface area and may be the cause of improved sorption (Sikdar et al. 2020).

Table 1 Surface area and porosity parameters

Point of zero charge

The point of zero charge (pHPZC) is the pH at which the net surface charge of adsorbent equal zero. The value of pHPZC measured was estimated to be 7.5 for ACCSs (Fig. 2). The biosorbent surface has positive charge when the pH < 7.5 and a negative charge when pH > 7.5 (Zbair et al. 2018). Handayani et al. (2024) reported that cationic dyes preferred to be adsorbed at pH levels higher than pHPZC where the surface takes on a negative charge. MG is a typical positive dye and will follow this behavior. As a result of that pH, ACCSs will ideally absorb cationic dyes, including methyl green.

Fig. 2
figure 2

Plot of point zero charge of ACCSs

FTIR analysis

FTIR spectra of raw, activated, and dye loaded-activated Citrus colocynthis seeds (CCSs, ACCSs and MG-ACCSs, respectively) were carried out and the results obtained are shown in Fig. 3. Based on the FTIR analysis, the peaks at 2926 cm−1 and 2855 cm−1 can be assigned to C–H stretching of –CH3 and –CH2 groups, respectively (Elkady et al. 2020). The peak observed at 1379 cm−1 corresponds to the angular deformation of –CH groups in hemicelluloses (Jabli et al. 2023). The oxidative/alkaline treatment caused significant alterations in the peaks at 3350–3200, 1746, and 1050—1010 cm−1 for cellulose, hemicellulose, and lignin.

Fig. 3
figure 3

FTIR spectra of CCSs, ACSSs, and MG-ACCSs

The first shift was observed for the broad band in the region 3350–3200 cm−1, which was attributed to –OH stretching in cellulosic polysaccharides (Karoui et al. 2020; Guiza et al. 2021). This band increased in strength after H2O2/NaOH treatment, which can be attributed to the formation of liberated –OH groups. Shen et al. (2011) and Won et al. (2014) found that alkali pretreatment may cause a rupture on the surface wall of the biomass, resulting in the creation of extra functional groups.

The second major change was observed at 1746 cm−1 that assigned to the carbonyl vibration of carboxylic acids or esters, which after H2O2/NaOH treatment, disappeared and two new bands at 1635 cm−1 and 1465 cm−1 were identified, which can be attributed to asymmetric and symmetric vibrations of ionic carboxylic groups (–COO), respectively (Shin et al. 2022). This shift can be explained by the ability of the alkaline treatment to eliminate most of the lignin and hemicellulose contents. This is consistent with the findings of Rosales et al. (2016) which reported that alkaline H2O2 pretreatment was effective in reducing the degree of cellulose crystallinity, removing lignin, separating hemicellulose from cellulose, and increasing biomass accessible surface area. In addition recently, Bhattacharjee et al. (2020) demonstrated that an alkaline treatment can efficiently dissolve covalent connections between lignocellulose components and degrade hemicellulose and lignin, resulting in the formation of additional sorption functional groups.

The third significant alteration is the formation of additional strong bands at 1157 and 1027 cm−1 following chemical activation, which can be attributed to C–O stretching and bending of carboxylate groups or cellulose esters (Maaloul et al. 2017; Bergna et al. 2022; Basharat et al. 2022).

The FTIR spectra for ACCSs before and after dye biosorption were highly similar, indicating that the main functional groups of ACCSs did not change during the dye biosorption process but their bands showed a considerable increase in intensity. The band of the hydroxyl groups widens, indicating that the MG dye reacts with the adsorbent. The − OH groups can form hydrogen bonds with –N(CH3)2 ion of the MG dye molecule facilitating in the adsorption of the dye molecules onto ACCSs (Alorabi and Azizi 2023). The increase in intensity of the band at 1027 cm−1 can be explained by the additional –CN groups’ stretching vibrations of MG aliphatic amines, indicating a dye-adsorbent reaction (Basharat et al. 2020). The increase in the intensity of bands at 1635 cm−1 and 1465 cm−1 can be explained by the involvement of − COO ions in MG biosorption through electrostatic attraction between these ionic carboxylic groups and (CH3)3N+ group from the dye (Sharma and Das 2013). Furthermore, the band at 1589 cm−1 attributed to the aromatic C = C vibrations, showing a slight increase in intensity owing to π–π interactions between MG dye aromatic rings and –C = C– onto the ACCSs surface (Karoui et al. 2021).

All of these interactions between the cationic MG dye stain and other adsorbents have been described in prior research (Sharma and Das 2013; Sharma et al. 2014; Alorabi and Azizi 2023). These FTIR spectra changes revealed that certain ACCSs chemical functional groups (particularly carboxyl and hydroxyl groups) are the most important sites in the dye uptake process, encouraging dye-binding processes.

SEM–EDX analysis

The surface morphology of native and modified forms of CCSs was studied using SEM. Figure 4 shows SEM micrographs of CCSs, ACCSs, and MG-ACCSs. The SEM micrographs of CCSs (Fig. 4a,b) exhibited a rough surface with irregular polygonal parenchymal cells with different sizes and shapes (Alghamdi and El Mannoubi 2021). After H2O2/NaOH treatment, the surface becomes smooth and highly porous displaying many easily seen large and well-developed cavernous porous structures offering many potential sites for dye adsorption (Fig. 4c,d). This can be explained by the breakdown of hemicellulose, lignin, and others during the chemical activation phase which makes the active surface area more disclosed (Laskar and Kumar 2019; Bello et al. 2020). When MG was adsorbed, textural properties of ACCSs surface were completely changed due to the filling of most of the pore cavities and active sites by MG dye molecules indicating that the adsorption phenomena occurred (Fig. 4e,f) (Ben Arfi et al. 2019).

Fig. 4
figure 4

SEM mages of (a-b) CCSs, (c-d) ACCSs, and (e–f) MG-ACCSs at (500 × and 1500 ×), respectively

The energy dispersive X-ray technique (EDX) spectral analysis of CCSs and ACCSs is depicted in Fig. 5. The atomic and weight percentages of elements are summarized in the inset tables. The obtained results revealed that C and O contributed the two major elements in addition to small amount of N, accounting for 99.32% by atom (97.88% by weight) of the raw biomass and 99.75% by atom (99.26 by weight) of the activated sample. The CCSs contained 56.40% by atom (49.01% by weight of carbon) while ACCSs contained 48.53% by atom (41.47% by weight) of carbon. On the other hand, CCSs contained 37.24% by atom (43.11% by weight of oxygen) while ACCSs contained 47.56% by atom (54.14% by weight) of oxygen. As can be seen, a strong decrease in the carbon content was observed and inversely a substantial increase in the oxygen content in ACCSs compared to CCSs through the chemical treatment indicating enhancement of oxygen-containing functional groups on the surface of ACCSs (Al-Shehri et al. 2022; Djezzar et al. 2024). This elemental composition change can be ascribed with the effects of the simultaneous H2O2 and NaOH activation on raw sample suggesting that chemical activation will lead to an adsorption capacity elevation (Ojedokun and Bello 2017). Our findings are consistent with some earlier studies who reported that the effectiveness of a biosorbent to remove dyes from aqueous solutions is related to the presence of high amount of oxygen (Bergna et al. 2022; Shin et al. 2022; Djezzar et al. 2024). The abundant components identified by EDX as key elements in the raw and activated seeds are consistent with FTIR spectrum data, with several functional groups serving as primary sites in biosorption process (Moghazy 2019).

Fig. 5
figure 5

EDX spectra of (a) CCSs and (b) ACSSs

TGA analysis

TGA was used to test the thermal stability of the three samples (CCSs and ACCSs). Figure 6 depicts a plot of percent weight loss versus temperature over time. Thermogravimetric (TG) experiments were conducted at temperatures ranging from 25 °C to 800 °C with a heating rate of 10 °C/min. TG pyrolysis plots exhibit the typical Z-shaped downward sloping curves distinctive of the thermal deterioration of lignocellulosic biomass under an inert atmosphere (Alghamdi and El Mannoubi 2021). All the thermograms revealed that the heat breakdown of CCSs samples occurred in two stages. In the first stage, CCSs and ACCSs lost 5% and 7% of their weight between 25–150 ºC and 25–167 ºC, respectively, which could be related to the dehydration and volatilization of some light volatile compounds such as moisture (Holliday et al. 2024). The highest mass % loss during the second step was estimated to be 65%% for both CCSs and ACCSs that occurred between 150–440 °C and 167–410 °C, respectively, which can be related to the loss of lignocellulosic biomass components namely holocellulose and lignin which includes dehydration, depolymerization, and deterioration of glycosyl cellulosic units (Hu et al. 2020; Jabli et al. 2023). At the end of this step, the samples were completely pyrolyzed followed by a gradual drop in weight loss of 5% and 10% for CCSs and ACCSs, respectively, where the corresponding curves tended to be flat. The mass of biosorbents remained constant at 25% for CCSs and 18% for ACCSs at 800 °C corresponding to the ash content of the biosorbents. However, the rate of loss of volatiles for ACCSs adsorbents was significantly higher than that of CCSs. At temperatures ranging from 25 to 800 ºC, CCSs and ACCSs lost 75% and 82% of their weight, respectively. As can be seen, the oxygen-content functional in the ACCSs adsorbent was about 5% confirming the success of the H2O2/NaOH chemical activation approach in increasing the O/C ratio in the modified biomass.

Fig. 6
figure 6

Thermogravimetric analysis of CCSs and ACCSs

Adsorption studies

Adsorption selectivity experiments

The activated adsorbent was tested for the removal efficiency of four selected cationic dyes namely malachite green (MaG), methylene blue (MB), methyl green (MG), and crystal violet (CV) at the following parameters (pH = 6.5 ± 0.2, initial MG concentration = 20 mg/L, contact time = 24 h, Temperature = 298 K and adsorbent mass = 0.015 g) as portrayed in Fig. 7. The obtained %R values were 55.05% (MaG), MB (70.9%), CV (74.06%), and MG (97.9%). As can be concluded, MG dye exhibited the strongest adsorption affinity toward ACCSs among all tested dyes and the adsorption affinity order based on percentage of dye absorption was MG > CV > MB > MaG. These findings strongly suggest that the order of affinity is determined by the structure, molecular size, and functional groups of the tested cationic dyes that will experience different physical and electrostatic forces on the adsorbent surface (Anirudhan and Ramachandran 2015; Alshahrani et al. 2022).

Fig. 7
figure 7

Selectivity studies of ACCSs toward different dyes

The removal of MG dye and adsorption capacity were evaluated using both CCSs and ACCSs as adsorbent materials at pH = 6.5 ± 0.2, initial MG concentration = 40 mg/L, contact time = 24 h, and temperature = 298 K at the following adsorbent masses: 0.01, 0.02, and 0.03 g (Fig. 8 and Fig. 9). For each biosorbent, the increase in adsorbent mass results in the rise of the removal percentage and the decline of the adsorption capacity. The removal efficiency and the adsorption capacity reached the highest values (%R = 98.48 at 0.03 g and Qad = 164.02 mg/g at 0.01 g) when using ACCSs compared to the raw CCSs (%R = 52.90 at 0.03 g and Qad = 71.22 mg/g at 0.01 g). Hence, the ACCSs was selected as the more suitable adsorbent for the removal of MG dye since the removal efficiency and adsorption capacity were enhanced by 1.9 and 2.30 times, respectively, after chemical treatment. This can be explained by the fact that the H2O2/NaOH treatment improved the surface area properties and increased the amounts of oxygen-containing functional groups of the activated adsorbent which contributes to the enhancement of the removal efficiency and the adsorption capacity (Abegunde et al. 2020; Shin et al. 2022).

Fig. 8
figure 8

MG dye removal efficiency onto CCSs and ACCSs

Fig. 9
figure 9

MG dye adsorption capacity onto CCSs and ACCSs

Effect of pH

pH is one of the most crucial parameters that affects dye adsorption process by modifying the surface charge of the adsorbent and the ionization extent of the adsorbate molecules and consequently changing the adsorbent–adsorbate electrostatic interactions (González et al. 2024). Figure 10 shows the percentage removal and the adsorption capacity of MG by ACCSs at different pH values ranging from 4 to 10 with all other parameters held constant (temperature = 298 K, MG Ci = 30 mg/L, adsorbent mass = 0.015 g, time = 24 h). By increasing the starting solution pH from 3 to 7, the percentage dye removal and adsorption capacity improved dramatically from 63.33% to 97.80% and 63.33 mg/g to 97.80 mg/g, respectively, and then stabilized. The following factors may explain the lower dye removal and adsorption capacity values in acidic mediums compared to high values in neutral and basic media: as can be seen, lower values of removal efficiency and adsorption capacity were obtained in acidic media especially at pH = 4. This can be explained by the competition between abundant H+ ions with the MG quaternary ammonium ions for the adsorption sites. Furthermore, at pH levels below 7.5, the adsorbent surface carries a positive charge. This protonation of functional groups such as –COOH and –OH on the ACCSs adsorbent likely induces electrostatic repulsion between the biosorbent and the cationic MG dye groups, particularly the quaternary ammonium ions. Consequently, this repulsion possibly suppresses and limits the uptake process (Hu et al. 2020; Ceroni et al. 2024; Abegunde et al. 2024). On the other hand, as pH increased, competition for ACCS sites decreased, resulting in improved MG adsorption onto ACCs. It was interesting to note that when pH values exceeded the pHpzc of ACCSs (7.5), the ACCSs surface had a net negative charge caused by the deprotonation of the oxygen-containing functional groups converted to anionic groups which leads to high electrostatic attraction between the deprotonated carboxyl and hydroxyl groups and the cationic dye molecule (Saha et al. 2020; Ceroni et al. 2024). This behavior promotes MG adhesion to ACCSs adsorbent. Our findings support previous observations about the adsorption of MG onto various adsorbents (Alalwan et al. 2021; ben Mosbah et al. 2022).

Fig. 10
figure 10

Effect of pH on MG dye adsorption performance onto ACCSs

Effect of adsorbent dose

Optimizing the adsorbent dosage is considered an essential step in the study of the adsorption process since it aids in the assessment of the adsorption loading and the determination of the minimal adsorbent dose required to achieve maximum dye adsorption. The impact of ACCSs adsorbent dose on MG biosorption is depicted in Fig. 11. The experiments were carried out at MG Ci = 15 mg/L; pH = 6.5 ± 02; T = 298 K, and contact time = 24 h. The plot clearly illustrates that when the adsorbent mass increased from 0.005 to 0.035 g, the removal effectiveness increased from 67.97% to 98.29%, which may be attributable to an increase in the number of accessible binding sites (Kalderis et al. 2023). Djezzar et al. (2024) recently reported that increasing the adsorbent dose resulted in a significant improvement in removal efficiency due to the provision of a larger surface area, and thus greater accessibility of functional groups, allowing for more vacant reactive adsorption sites to attract MG ions. Beyond 0.035 g, the percentage of dye clearance increases, with no significant change even when the ACCSs dosage is increased higher. This can be explained by the fact that active biosorbent sites demonstrate decreased uptake of MG ions with the excess of adsorbent mass due to their saturation, overlapping, or aggregation, decreasing the accessible surface area (Alardhi et al. 2020; Sikdar et al. 2020; Hermann et al. 2022). Interestingly, there was an inverse association between the adsorbent mass and the adsorption capacity (Widiartyasari Prihatdini et al. 2023). For example, the highest amount of adsorbed of MG on ACCSs (203.90 mg/g) was seen at the lowest adsorbent dose (0.005 g). Based on that value, increasing the adsorbent dosage resulted in a considerable drop in adsorption capacity. The observed decrease in the amount of MG adsorbed persisted as the ACCSs dosage rose, reaching equilibrium at 0.035 g where the adsorption capacity reached 42.13 mg/g. The decline in adsorbate–adsorbent site affinity at high adsorbent mass can be attributed to the high binding site interference and other phenomena like clogging, aggregation, agglomeration, and overcrowding (Mohamed et al. 2021). Thus, 0.035 g was selected as the optimum adsorbent mass for further experiments.

Fig. 11
figure 11

Effect of adsorbent dose on MG dye adsorption performance onto ACCSs

Effect of MG initial concentration and temperature

The adsorption capacity of ACCSs was tested with MG starting concentrations ranging from 15 mg/L to 70 mg/L at different temperatures (298, 313, and 328 K). Our data showed a gradual increase in adsorption loading as the initial dye concentration increased (Fig. 12). According to our findings, the adsorption capacity improved from 36.34 mg/g to 140.61 mg/g at 298 K, 36.52 mg/g to 152.80 mg/g at 313 K, and 36.46 mg/g to 164.70 mg/g at 328 K. This can be explained by the presence of many adsorbate molecules in solution which strengthens the collisions between MG molecules and ACCSs active sites and leads to an increase in the adsorption driving force at higher initial MG concentrations surpassing the mass transfer resistance between the adsorbent and the dye solution (Mohamed et al. 2021; Al-Shehri et al. 2022).

Fig. 12
figure 12

Effect of temperature on the adsorption capacity of ACCSs at different initial MG dye concentrations

It was discerned that the dye uptake increased with an increase in temperature of the solution suggesting that the adsorption process is temperature dependent (Değermenci et al. 2019). As shown in Fig. 12, the dye uptake increased from 119.21 to 134.51 mg/g at 60 mg/L and from 140.61 to 164.70 mg/g at 120 mg/L while increasing temperature from 298 to 328 K, respectively. At higher temperatures, two phenomena occur. First, the rate of diffusion of MG dye molecules increased through the external boundary layer and in the internal pores of ACCSs adsorbent, causing the solution viscosity to decrease. Second, the adsorbent porosity is improved due to the large number of available active adsorption sites. Consequently, the chemical interactions between the adsorbate molecules and the adsorbent surface increased (Sukla Baidya and Kumar 2021). Such behavior indicates that the biosorption of MG onto ACCSs is an endothermic chemical process. These findings were consistent with the reports of Rida et al. (2020), and Alorabi and Azizi (2023).

Adsorption kinetics

The pseudo-first-order (PFO) and pseudo-second-order (PSO) kinetic models were applied to understand and assess the mechanism of MG adsorption process onto ACCSs. The parameter values for both models were determined and summarized in Table 2. Figure 13 illustrates the linear plots of ln (qe—qt) versus t and t/qt versus t for PFO and PSO, respectively. These plots were used to determine the values of rate constants and the correlation coefficients (R2). Our findings exhibited that the adsorption kinetic data are well described with PSO (R2 = 0.998) compared to PFO (R2 = 0.919). Furthermore, the calculated adsorption capacity derived from PSO (111.111 mg/g) agrees reasonably well with the experimental value (92.487 mg/g) than those derived from PFO (58.749 mg/g). This model suggests that the rate-determining step of adsorption could related to a chemical adsorption process between the cationic dye molecules and the oxygen functional groups of the adsorbent, particularly with an electrostatic or π–π interactions (Alshahrani et al. 2022; Ceroni et al. 2024). Thus, kinetics supports the successful chemical modification (Hermann et al. 2022; Widiartyasari Prihatdini et al. 2023).

Table 2 Adsorption rate constants of MG for ACCSs
Fig. 13
figure 13

Pseudo-first and pseudo-second-order kinetic models for adsorption of MG dye onto ACCSs

Adsorption isotherms

Langmuir, Freundlich, and Dubinin–Radushkevich isotherm models in their linearized forms were adopted to ascertain the adsorption mechanism and assess the maximum adsorption capacity. Adsorption isotherms were plotted by adding 0.02 g of adsorbent to 50 mL of MG solution at concentrations ranging from 15 to 120 mg/L at three temperature values (298, 313, 328 K) during 300 min without solution pH modification. The linear graphs of the three isotherm models are portrayed in Fig. 14 and the isotherm parameters are summarized in Table 3. Compared to Dubinin–Radushkevich (R2 < 0.99) and Freundlich (R2 < 0.90) models, the Langmuir isotherm provided a better fit for MG biosorption onto ACCSs (R2 > 0.999). These findings indicate that chemical adsorption was the main driver of the process, and monolayer sorption proceeds on the adsorbent homogeneous surface with no interaction between the adsorbed molecules (Mohanta et al. 2021). The maximum monolayer coverage was 164.7 mg/g at 328 K. Our results agree with several previous works on MG dye uptake using other adsorbents (Table 4). It is worth noting that the ACCSs used in this investigation exhibited the highest monolayer maximum adsorption of MG dye among all studied adsorbents such as Bamboo (20.41 mg/g) (Adnan Atshan 2014), Pinus brutia cones (56.81 mg/g) (Mekhalif et al. 2017), activated carbon from fruit shell (67.93 mg/g) (Rida et al. 2020), almond shells (1.143 mg/g) (Tanaydin and Goksu 2021), activated residual Dodonaea Viscosa (99.03 mg/g) (Alorabi and Azizi 2023). The highest qmax value obtained in the current study can be explained by the effective enrichment of O-containing functional groups on the chemically activated adsorbent surface such as. –COOH and –OH (Shin et al. 2022).

Fig. 14
figure 14

Linearized Langmuir (a), Freundlich (b), and Dubinin–Radushkevich (c) isotherm equations onto ACCSs

Table 3 Langmuir, Freundlich, and Radushkevich parameters for adsorption of MG dye onto ACCSs at different temperature values
Table 4 Comparison of ACCSs with other reported adsorbents

The magnitude of the adsorption mean free energy, derived from the Dubinin–Radushkevich equation (Table 3), can be used to determine the type of adsorption mechanism. This energy has been identified to be less than 8 kJ/mol, namely between 1.581 and 2.236 kJ/mol. This finding indicates that the physisorption of MG onto ACCSs is the primary adsorption mechanism (Alshahrani et al. 2022). The magnitude of n (the adsorption intensity) calculated from Freundlich equation was greater than unity, which suggests a favorable adsorption (Al-Shehri et al. 2022; Park et al. 2023).

Biosorption thermodynamics

The values of ΔHº and ΔSº were calculated from Van’t Hoff linear graph (Fig. 15) and were used to calculate ΔGº values at a given temperature. The thermodynamic data are summarized in Table 5. The negative value of the free Gibbs energy is an indicator of the feasibility and spontaneity of MG biosorption onto ACCSs at all studied temperatures. The decline in ΔGº values with an increase of temperature shows that biosorption is favored and that the dye elimination is facilitated at higher temperatures (Amellal et al. 2024). Positive results for ΔHº and ΔSº indicate that MG biosorption is an endothermic process with increased unpredictability at the adsorbent/solution interface. As the value of enthalpy change does not exceed 40 kJ/mol, the process can be classified as physical adsorption (Ali et al. 2016). The positive value of ΔSº demonstrated that the facilitated electrostatic interactions between MG2+ and the active sites of ACCSs in aqueous solution can enhance the randomness of MG2+at the liquid–solid interface (Shin et al. 2022).

Fig. 15
figure 15

Van’t Hoff plot of MG dye adsorption onto ACCSs

Table 5 Thermodynamic parameters for adsorption of MG on ACCSs

Mechanism of adsorption

To comprehend the adsorption mechanism, it is essential to determine the main functional groups in the dye molecule as well as those present at the surface of the adsorbent. MG is a divalent cationic dye composed of − C = N+, (CH3)3N+ groups and a conjugated aromatic system (Fig. 1). Numerous research studies have proved that Citrullus colocynthis seeds are rich in tannins, flavonoids, phenolic acids, terpenoids, glycosides, tocopherols, carotenoids, and oil (Al‐Hwaiti et al. 2021; Khan et al. 2023). Most of these secondary metabolites are aromatic compounds which are characterized by the presence of hydroxyl, carbonyl, and carboxyl groups. Our findings from FTIR analysis as well as isotherm, kinetic, and thermodynamic parameters were very useful to understand and explain the adsorption mechanism. According to the results of FTIR spectra, hydroxyl and carboxyl groups present on the surface of the ACCSs adsorbent were found to be the key sites involved in the biosorption of MG dye via hydrogen bonding between –OH of the biosorbent and –N(CH3)2 groups of the MG molecule. This finding is supported by the results of thermodynamics where the adsorption mechanism is classified as a physical process depending on the low the ΔH° values and backed by isotherm study (Dubinin–Radushkevich model) which suggested a physisorption due to the low adsorption mean free energy (less than 8 kJ/mol). The intensity of the bands associated with the symmetric and asymmetric stretch of C = O in carboxylate ions showed a slight increase due to electrostatic attraction between the negative charge of COOH group onto the biosorbent surface and the cationic (CH3)3N+ group of MG dye. In addition, the increase in the band intensity at 1589 cm−1 suggests a possible π–π interactions between π-electrons of MG aromatic C = C bonds and those found on the surface of the activated adsorbent as the third sorption mechanism. Such π − π interaction will enhance the adsorption amount. Adsorption isotherms (Langmuir model) and kinetics modeling (PSO model) support chemical sorption through electrostatic and π–π interactions. Figure 16 depicts the MG adsorption pathway onto ACCSs, which demonstrates all of these interactions.

Fig. 16
figure 16

Proposed adsorption mechanisms of MG dye onto ACCSs

Conclusion

The current study demonstrated that the removal of MG dye from aqueous solution using chemically activated Citrus colocynthis seeds, which are an effective, eco-friendly, and inexpensive biosorbent. The H2O2/NaOH activation approach results in significant shape and porosity development of the CCSs. According to the characterization data, the ACCS surface becomes predominantly mesoporous, with many oxygenated functional groups. The optimal adsorption parameters were pH = 6.5 ± 0.2, initial MG concentration = 30 mg/L, contact time = 300 min, and temperature = 328 K. Kinetic and isotherm data showed that MG biosorption onto ACCSs is well described by pseudo-second-order kinetic model and well suited to Langmuir isotherm model which suggests that physical and chemical adsorption were the main driver of the process via H-bonding, electrostatic attraction, and π–π interactions between the cationic dye molecules and the oxygen functional groups of the adsorbent on a homogeneous and monolayer adsorbent surface with a maximum monolayer coverage of 164.7 mg/g at 328 K. These results were consistent with FTIR analysis which revealed that carboxyl and hydroxyl groups are the main ACCSs surface sites as well as π-electrons of aromatic rings play a significant role in MG dye uptake. Thermodynamic parameters revealed that the adsorption of MG dye onto ACCSs is a spontaneous, physical, temperature-favored endothermic, and entropic process.

Considering all the above findings, we concluded that the activated Citrullus colocynthis prepared using a two-step H2O2/NaOH activation technique was successfully tested for the removal of MG, a toxic basic dye and it may be used as an alternative to high expensive adsorbents for the elimination of organic dyes from wastewater and aquatic bodies.