Introduction

Monotheca buxifolia is a wild fruiting tree belonging to the family Sapotaceae1. It is characterized as a small evergreen shrub or tree, typically reaching around 10 meters in height2. This species is distributed in barren hilly areas3 and is native to Afghanistan and Pakistan4. It is commonly found in Khyber Pakhtunkhwa (specially in Chitral, Drosh, Kohat, and Attock Districts) and Balochistan (including Loralai, Zhob, and Gorakh Hills)1. The fruit of Monotheca buxifolia, locally known as ‘‘Gwargurah, Gurgura, or Gargol,” is considered an essential wild fruit with a pleasant aroma, delicate taste, and high nutritive value2. This fruit is rich in flavonoids and phenolic compounds5,6,7, carbohydrates8, protein8, and essential minerals nitrogen, phosphorus, potassium9. Additionally, it contains bioactive compounds like α-amyrin, lupeol10, as well as isoquercetin11. This fruit exhibits antioxidant properties8, along with antibacterial and cytotoxic effects10. It also possesses laxative and digestive properties12,13 and has been noted for its urease-inhibitory, hepatoprotective, and antibacterial properties14.

The fatty acids commonly found in various parts of the plant include oleic acid, palmitic acid, stearic acid, linolenic acid, and myristic acid9. Monotheca buxifolia also contains a significant concentration of minerals such as iron, potassium, sodium, phosphorus, magnesium, nitrogen, and copper8. Active compounds identified in the fruit through GC-MS analysis include vaccenic acid, oleic acid, hexadecanoic acid, and phthalic acid15. Its aqueous extract contains terpenoids, flavonoids, saponins, and anthraquinones8.

Dyes are colored organic compounds used for coloring different substrates16. Since their discovery during the Industrial Revolution in the 19th century, synthetic dyes have replaced natural dyes in many industries such as textiles and food17. Due to their superior performance characteristics, ease of handling, synthetic dyes are widely recommended for use in modern dye houses worldwide18.

However, the textile industry releases millions of tons of waste into the ecosystem annually from dyeing processes19. Synthetic dyes are also utilized in food and cosmetics to enhance product appeal20,21. Recent reports indicate that the utilization of synthetic dyes reaches up to 1.3 million tons annually with a total market value exceeding around 23 billion dollars. While the persistence of synthetic dyes in wastewater poses significant risks to human health and the environment due to their toxicological effects22,23,24. During the dyeing process, the completely expulsion of the colorants into the environment ranges from 10 to 50%25, which cause skin irritation26, carcinogenic effects, and allergic reactions in humans27. Most of these dyes contain aromatic rings and azo functional groups, which pose risks to human health, such as triggering hyperactivity and asthma attacks28.

During the second half of 20th century, research was conducted on the toxicity, allergic reactions, and harmful effects of synthetic or chemical dyes on human health, which developed interest in the discovery of natural dyes29. Natural dyes are primarily known for their eco-friendly behavior, biodegradability, lower toxicity and reduced allergic properties compared to synthetic dyes30. Countless researchers have pointed out the positive aspects of natural dyes, noting their sustainability, safety, and the fact that they do not retain harmful properties once used31. They play a crucial role in influencing human health due to their wide range of therapeutic qualities, including antimutagenic, anti-rheumatic, anti-inflammatory, and antioxidant effects32. By utilizing natural dyes with these protective properties, dyed fabric can gain the ability to act as a barrier against severe diseases and resist microbiological damage33. They offer a non-toxic solution for coloring food, textiles, leather, and other materials, especially in applications that require non-toxicity34. Compared to synthetic analogues natural dyes are generally considered safer due to their biodegradability and reduced toxicity35. The worldwide demand for natural dyes reaches up to 10,000 tonnes; however, it is reported that only 1% is associated with the total usage of synthetic dyes globally34.

The aim of this research was to compare the extraction methods for obtaining natural colors from Monotheca buxifolia fruits, with the usage of different extraction methods such as aqua-enhanced and maceration and to evaluate the potential of these colors. The results confirm the extracted colors quality by analyzing their physiochemical properties and also bioactivities, marking the first exploration of these fruits for the production of natural color and also its usage in hard candies. A high content of bioactive compounds has been highlighted by these findings, which suggest its suitability as natural colorants across many industries such as food, cosmetics and pharmaceuticals and also as an alternative to the dyes which are produced synthetically.

Results

Gravimetric analysis

Two natural colors, named natural color 1 (SQ1) and natural color 2 (SQ2) were extracted from the fruit pulp of Monotheca buxifolia using two methods: aqua-enhanced extraction and maceration. The percentage yields for aqua-enhanced extraction and maceration were recorded as 60.42 ± 0.004% and 48 ± 0.01%, respectively, as shown in Table 1. The findings indicated a significant enhancement of 25.875% in the yield of coloring matter with the aqua-enhanced extraction method compared to maceration extraction (Fig. 1A).

Ash test

The contents of ash showed the total mineral content in food, which mostly included essential nutrients like sodium, calcium, potassium, and chloride. When analyzed, SQ1 demonstrated an ash content of 19.95%, while SQ2 indicated a lower ash content of 16.98% (Table 1; Fig. 1A).

Anthocyanin Estimation

In this study, it was concluded that SQ2 exhibited higher anthocyanin content than SQ1 (Fig. 1A). Specifically, the Total Anthocyanin Content (TAC) of SQ1 was recorded up to 15.7 mg Cyn-3-Glu/100 g, while SQ2 cover a total of 19.37 mg Cyn-3-Glu/100 g of anthocyanin, as shown in Table 1.

Flavonoid Estimation

The aluminum chloride method revealed that SQ1 exhibited a higher flavonoid content compared to SQ2 (Fig. 1B). Specifically, SQ1 had a total flavonoid content (TFC) of 67.25 mg/g, while SQ2 contained 66.34 mg/g of total flavonoids, as shown in Table 1.

Phenolic Estimation

Phenolic estimation in all the samples was conducted using the Folin-Ciocalteu’s (FC) reagent. It was observed that SQ1 exhibited a higher phenolic content, while SQ2 showed lower values compared to SQ1, as shown in Fig. 1B. Specifically, SQ1 had a total phenolic content (TPC) of 0.78 mg/g gallic acid equivalent (GAE), whereas SQ2 contained 0.10 mg/g GAE of total phenolics (Table 1).

Carbohydrate Estimation

Total carbohydrate content in both natural colorants was estimated using the phenol-sulfuric acid method and quantified spectrophotometrically. SQ1 demonstrated a higher carbohydrate content (25 mg/g) compared to SQ2 (21.02 mg/g of total carbohydrates) (Fig. 1B) Table 1.

Table 1 Comparative results of both SQ1 and SQ2 extracted natural colors.
Fig. 1
figure 1

A and B shows comparison between results of physiochemical characterization of SQ1 and SQ2 colors. The data are presented as mean values with error bars depicting the standard deviations (SD) from three replicates. Statistical analysis employed Two-Way ANOVA with lower case letters denoting significant differences at the p < 0.05 level among the various level.

Phytochemical screening

Phytochemical screening of both natural colors revealed the presence of a distinct variety of phytochemicals, including phenols, flavonoids, leucoanthocyanins, diterpenes, triterpenes, steroids, sterols, amino acids, and carbohydrates, as shown in Table 2. Furthermore, these secondary metabolites play a significant role in pharmaceuticals and other commercial products.

Table 2 Phytochemical screening of extracted natural colors from Monotheca buxifolia.

UV-visible spectrum analysis

The UV-visible spectrum of the extracted natural colors was captured using UV-vis spectrophotometer while its absorption peaks recorded at different wavelengths, such as 284 nm for SQ1, and 272 nm and 290 nm for SQ2, as shown in Fig. 2.

Fig. 2
figure 2

Shows graphs of results of UV Vis spectrophotometer both SQ1 and SQ2 colors. The absorption peaks at different wavelengths, such as 284 nm for SQ1 (A), and 272 nm and 290 nm for SQ2 (B), are indicative of the presence of flavonoids, and their derivatives.

FTIR analysis

Fourier Transform Infrared Spectroscopy (FTIR) spectrum analysis of extracted natural colors (SQ1 and SQ2) was carried out at 400 to 4000 cm− 1 scan range. The results for SQ1 revealed that the alcoholic O-H group was typically observed at 3265 cm− 1, with C-H stretching representing the presence of alkanes at 2922 cm− 1. While alkynes presence indicated by a bonding of C ≡ C at 2112 cm− 1, respectively. However, Aldehydes and ketones were showed by the C = O carbonyl compound at 1610 cm− 1. At 1405 cm− 1 and 1343 cm− 1, O-H bending of alcohols or carboxylic acid and phenol was indicated, respectively. The C-N stretching for amines and also C-F stretching for fluoro compounds were observed at 1247 cm− 1 and 1017 cm− 1, respectively. -CH2 rocking was evaluated at 765 cm− 1 for alkanes (Table 3A, Fig. 3A).

Furthermore, the results indicated for SQ2 showed that the O-H group of alcohols was observed at 3267 cm− 1, and the alkane’s occurrence was represented by C-H stretching in the range of 2923 cm− 1. At 2106 cm− 1 the stretching range of C ≡ C was related to the presence of alkynes. The C = O carbonyl compound indicated aldehydes and ketones at 1615 cm− 1. At 1406 cm− 1 and 1340 cm− 1, O-H bending of alcohols or carboxylic acid and phenol was indicated, respectively. C-N stretching for amines and C-F stretching for fluoro compounds were also present at 1247 cm− 1 and 1022 cm− 1, respectively. -CH2 rocking was observed at 766 cm− 1 for alkanes (Table 3B, Fig. 3B).

These results indicated that alcohols, alkanes, alkyne, aldehydes, ketones, amine, fluoro compound and phenol were present in the samples.

Fig. 3
figure 3

FTIR Analysis Extracted SQ1 and SQ2.

Table 3A Functional groups identified in FTIR analysis of SQ1.
Table 3B Functional groups identified in FTIR analysis of SQ2.

Cytotoxic activity

Distinct concentrations of the natural colors (10, 20, 40 and 60 µg/mL) were utilized to examine Human Embryonic Kidney (HEK293) growth inhibition. The MTT assay was used to assess cell viability and to determine any reduction caused by the extracted colors. The cell viability percentage of the tested compounds is presented in Fig. 4; Table 4.

Table 4 Cytotoxic effect of natural colors against human embryonic kidney HEK293 cell line by MTT assay.
Fig. 4
figure 4

Shows comparison between results of MTT assay (Cytotoxic effect) of different concentration of both SQ1 and SQ2 colors. The data are presented as mean values with error bars depicting the SD from three replicates. Statistical analysis employed Two-Way ANOVA with lower case letters denoting non-significant differences.

Both extracted natural colors, SQ1 and SQ2, were investigate for their cytotoxic effects on the HEK293 cell line at different concentrations. Particularly, neither SQ1 nor SQ2 have shown cytotoxic effects at certain concentrations, as evidenced by their cytotoxicity percentages remaining above the control group (96.198%). When both the extracts were compared, SQ1 exhibit a higher cytotoxic effect than SQ2. Specifically, SQ1 showed cytotoxicity percentages of 205.8%, 216.2%, 213% and 174.7% at concentrations of 10, 20, 40, and 60 µg/ml, respectively. In contrast, SQ2 exhibited lower cytotoxicity percentages of 202.96%, 200.7%, 127.7% and 101.7% at the same concentrations.

Antibacterial activity

The results showed that ZOI standard (Novidat) exhibited the highest zone of inhibition, followed by SQ2 (17 mm) against Enteropathogenic Escherichia coli (EPEC), followed by SQ1 with 14 mm against EPEC and 12 mm against S. aureus. The lowest zone of inhibition (11 mm) was observed for SQ1 and SQ2 against Avian Pathogenic Escherichia coli (APEC) and S. aureus (Table 6; Fig. 5A, B, C).

Fig. 5
figure 5

Shows comparison between results of antibacterial activity of different concentration of both SQ1 and SQ2 colors and ZOI standard. The data are presented as mean values with error bars depicting the SD from three replicates. Statistical analysis employed Two-Way ANOVA with lower case letters denoting non-significant differences.

Antifungal activity

The results showed that neither SQ1 nor SQ2 exhibited any zone of inhibition (0 mm) against Aspergillus niger, Aspergillus fumigatus, or Aspergillus flavus (Table 5).

Table 5 Antibacterial and antifungal activity of extracted natural colors.

CIE L* a* b* values of natural color

The study investigate the CIE L* a* b* values of extracted natural colors, which displayed a reddish-orange hue. The highest L* value, exhibiting greater lightness, was probably observed in the SQ1 color (22.99). In comparison, the lowest L* value of 17.07 was recorded for the SQ2 color. The a* and b* values for SQ1 color were 19.18 and 29.63, respectively, which were greater than those of SQ2 color, which had values of 18.3 and 23.37 (Fig. 6; Table 6).

Table 6 Colorimetric values of both extracted natural colors and SQ1 and SQ2 candies.
Fig. 6
figure 6figure 6

Shows comparison between RGB (Red-Green-Blue) values of both SQ1 and SQ2 colors and candies. The data are presented as mean values with error bars depicting the SD from three replicates. Statistical analysis employed Two-Way ANOVA with lower case letters denoting significant differences at the p < 0.05 level among the various level.

Applications in food industry

In this study, both the extracted natural colors were utilized in hard candies (Fig. 7A and B).

Fig. 7
figure 7

A SQ1 Hard candy B SQ2 Hard candy.

CIE L* a* b* values of hard candies

The study revealed the CIE L* a* b* values of both shades of hard candies, which instantly displayed a red-orange hue. The highest L* value, have showed greater lightness, was observed in the sample of SQ2 candy (47.64). In comparison, the smallest L* value of 42.22 was recorded for the SQ1 candy sample. The a* and b* values for SQ1 candies were 41.18 and 43.23, respectively, which were greater than those of SQ2 candies, which had values of 23.41 and 42.97 (Fig. 6; Table 6).

Testing of hard candies

Flavonoid Estimation

The results showed that SQ1 candy contained a higher flavonoid content compared to SQ2 candy. Significantly, the TFC of SQ1 was recorded at 10.26 mg/g, while SQ2 had 7.53 mg/g of total flavonoids (Fig. 8A; Table 7).

Phenolic Estimation

The total phenolic compound was examined in all the samples with the usage of FC reagent. It was observed that SQ1 candy showed a higher phenolic content than SQ2 candy. Specifically, SQ1 contained a TPC of 1.4 mg/g GAE, whereas SQ2 had a TPC of 0.41 mg/g GAE (Fig. 8A; Table 7).

Solubility time analysis

The solubility time analysis revealed that SQ1 candies dissolved in 13 min and 33.17 s, while SQ2 candies dissolved in 13 min and 33.50 s. The study indicated that the addition of natural colorants to hard candy did not impact the solubility time of the samples significantly (Fig. 8A; Table 7).

Ash test

It was revealed that the candy of SQ1 exhibited higher ash content compared to the candy of SQ2. Specifically, the total ash content of SQ1 candy was recorded as 0.0513% whereas, SQ2 candy contained a total ash content of 0.0455% (Fig. 8B; Table 7).

Moisture testing

The final moisture content was calculated as a percentage of the total wet weight. The SQ1 candies resulted in a moisture content of 1.83%, which was higher than the 1.28% reported for SQ2 candies (Fig. 8B; Table 7). The moisture content of food products is directly related to their hardness, texture, and shelf life.

BRIX analysis

Further study investigate that the candies of SQ1 and SQ2 had almost equal BRIX values. Significantly, total value of BRIX for SQ1 candy was 86.74%, however, SQ2 candy showed 86.744% BRIX value (Fig. 8B; Table 7).

Table 7 Comparative results of both SQ1 and SQ2 candies.

Antibacterial activity

The antibacterial activity of the candies was evaluated, and the results showed that ZOI standard (Novidat) exhibited the highest zone of inhibition, followed by SQ1 candy (29 mm) against S. aureus, followed by SQ2 candy, which demonstrated zone of inhibition of 22 mm against S. aureus. Additionally, SQ2 candy showed activity against EPEC with a zone of inhibition measuring 16 mm. However, neither SQ1 nor SQ2 candies exhibited any zone of inhibition against APEC, indicating that they lack antibacterial properties against this strain (Table 8; Fig. 8C).

Fig. 8
figure 8

A and B shows comparison between results of physiochemical characterization of SQ1 and SQ2 candies. While C Shows comparison between results of antibacterial activity of both SQ1 and SQ2 candies and ZOI standard. The data are presented as mean values with error bars depicting the SD from three replicates. Statistical analysis employed Two-Way ANOVA with lower case letters denoting non-significant differences at the p < 0.05 level among the various level.

Antifungal activity

The antifungal activity evaluation showed that neither SQ1 nor SQ2 candies exhibited any zone of inhibition against Aspergillus niger, Aspergillus fumigatus, or A. flavus, indicating that they possess no antifungal properties (Table 8).

Table 8 Antibacterial and antifungal activity of both candies.

Discussion

Natural colors offered an environmentally friendly solution for coloring food and other materials. The study examined that the aqua-enhanced extraction application could exceed the extraction of color from different parts of plants. In this comparative analysis, Monotheca buxifolia, a dye-yielding plant, was selected for the instant extraction by using aqua-enhanced extraction and maceration methods. This process ensures better mass transport to solvent, instantly promotes the efficiency of extraction. The extraction methods such as aqua-enhanced extraction method is considered an ideal method of having a highest percentage of coloring matter in comparison to maceration, indicating an enhancement of about 25.875% in efficiency of extraction. This improvement standardize with the results from36, who found similar results in the extraction of pomegranate with the usage of ultrasound, in comparison to Magnetic stirring, and37, who reported yields for other plants.

For ash content, it is concluded from the results that SQ2 exhibit low ash percentages as compared to SQ1, both exceeding the previously reported total ash content for fruit pulp of Monotheca buxifolia9. The study further reveal that both extracts are rich in minerals, which can further enhance their quality especially their nutritional profile. However8, noted an ash content ranging from 2.69 ± 0.29 to 3.43 ± 0.47 g/100 g in fruits of Monotheca buxifolia, further emphasize the mineral richness of the extracts arranged in this study.

The anthocyanin content of SQ2 is significantly higher than SQ1. These values are significantly higher than those reported by38, who found TAC of only 0.89 ± 0.01 mg CE/100 g FDS in water extracts and 4.68 ± 0.02 mg CE/100 g FDS in ethanol extracts of other plants.

The flavonoid content assessment with the usage of aluminum chloride method showed that both SQ1 and SQ2 extracts are notably rich in flavonoids, with SQ2 exhibiting a slightly lower TFC than SQ1. These findings is better than the previous research conducted by6, which reported a TFC of approximately 42.045 mg/g in methanolic extracts. The presence of flavonoids in Monotheca buxifolia has been reported by several studies, including those by5,7,8. Furthermore, the highest TFC at 48.68 ± 2.8 mg/g, showed by the aqueous extract of fruit, exceeding that of other fractions such as n-Hexane, methanol, butanol and ethyl acetate, as reported by7. Moreover11, reported, the flavonoid content in the fruit extract at 44.80 ± 1.65 mg of rutin equivalent per gram of dry weight, further revealing the potential of these extracts as significant source of flavonoids.

The phenolic content analysis in Monotheca buxifolia revealed significant differences in SQ1 and SQ2, whereas a slightly greater phenolic content has been demonstrated by SQ1. Previous research support this observation which confirm the presence of phenolic compounds especially in this species. For example7] and [5, reported that Monotheca buxifolia is rich in phenolic compounds, which is essential for exhibiting antioxidant properties5,7,3911. concluded TPC of approximately 49.60 ± 1.93 mg of GAE per gram of dry weight, which is greater than observed in this study for SQ1 and SQ2. Moreover6, reported that methanol extracts of Monotheca buxifolia fruit had TPC of 48.54 ± 2.9 mg/g which is also greater than the present study.

The analysis of the samples of carbohydrate content of Monotheca buxifolia reveals that SQ1 surpass SQ2, which is smaller than the range reported by8, which showed that carbohydrate levels in Monotheca buxifolia fruit can be 61.11 g/100 g to 73.33 g/100 g.

Using chemical and spectral screening secondary metabolites were analyzed in the extracted natural colors, which confirms presence of different range of phytochemicals8. recognized the presence of phytochemicals, includes terpenoids, flavonoids, anthraquinones, and saponins in the aqueous extract of Monotheca buxifolia fruit.

The extracted color’s UV-visible spectrum analysis show different patterns of absorption confirms the existence of several different types of phytochemicals. Probably, absorption peak of SQ1 at 284 nm, while SQ2 showed peaks at 272 nm and 290 nm. These observations are align with the presence of flavonoids, as supported by40.

FTIR spectroscopy was usually done to examine extracted natural colors’ functional groups and chemical bonds present in them39. reported the FTIR spectrum of the methanolic extract of leaves, revealed peak values at 3292 cm− 1and 1616 cm− 1, showing the existence of alcohols and aldehydes/ketones. The chloroform extract of leaves show a peak at 712 cm− 1, exhibiting the presence of -CH2 rocking, which is known as the characteristic of alkanes. The remaining functional groups were identified using the IR Spectrum Table and Chart provided by Sigma-Aldrich41, which support the results of FTIR spectra by correlating the observed peak positions with the corresponding chemical bonds and functional groups.

The MTT assay of SQ1 and SQ2 extracted colors on the HEK293 cell line revealed no cytotoxic effects upto the concentration of 60 µg/ml, ensure their safety at this level. These results are align with previous research conducted by42, suggested similar results for Calendula officinalis L. var. Gitana Orange and Gitana Yellow on the IEC-6 cell line, where no cytotoxic effects were observed. This comparison explained the non-toxicity of the extracted colors, supporting their potential use as natural edible food colorants.

The antibacterial activity assessment of extracted natural colors revealed their potential as effective antimicrobial agents. It is indicated that both SQ1 and SQ2 are having the antibacterial properties based on their inhibition zone, align with the findings from14. The results in accordance with previous research conducted by43, crude extracts from Monotheca buxifolia are having antibacterial properties against multiple bacterial strains, including Escherichia coli (E. coli) and S. aureus. In the current investigation the inhibition zones is considered higher as compare to the observed one. Moreover44, further supported that Monotheca buxifolia have antibacterial potential by examining its methanol extract, further concluded that this fruit have antimicrobial properties and also a valuable source of bioactive compounds. The existence of antibacterial activity has also been examined in dye against both S. aureus and E. coli, as indicated by45.

The evaluation of the antifungal activity of the natural colors demonstrates that both SQ1 and SQ2 does show any inhibitory effect against Aspergillus fumigatus, Aspergillus niger, or Aspergillus flavus. This lack of antifungal activity is in accordance with findings from15, who reported that no inhibition was exhibited by extracts of Monotheca buxifolia against various fungal strains, except for a notable response against Microsporum canis, which clearly showed a zone of inhibition. Despite of their inferior fastness, many natural dyes exhibited antibacterial and antifungal properties46. However, this study revealed that Monotheca buxifolia antifungal potential is limited against common pathogenic fungi.

CIE L* a* b* values were used to characterize color of extracted natural colors, reveals that both SQ1 and SQ2 demonstrated a reddish-orange hue. These results are significant as it highlights the potential of these natural colors in several industries, especially in food products. In comparison to SQ2 (17.07), L* value of SQ1 (22.99) exhibited the highest lightness it suggested more bright and visible colors. Both a* and b* values supported this observation; SQ1’s values of 19.18 (a*) and 29.63 (b*) indicate a stronger intensity of red and yellow hues, respectively, in comparison to SQ2, which had lower values of 18.3 (a*) and 23.37 (b*). The color viability suggested that for vibrant coloration of different applications SQ1 will be more suitable. The close similarity of SQ1 and SQ2 color to established shades, such as Brown Bramble (99.3% similarity) and Indian Tan (98.9% similarity), respectively, further highlight its potential for integration into existing product lines or formulations. SQ1 and SQ2 exhibit a specific color codes, #5B2A08 and #471E05, which provide a significant way for industries seeking to replicate or utilize these natural colors in their products.

The extracted natural colors have been added into hard candies serves multiple purposes that extend beyond mere aesthetics. Color plays a crucial role in food products, significantly attracts buyer interest and acceptance. As studied by47 the color addition can significantly increases the intensity of the original shade in food items, as it help to restore any colorless food item that may occur during processing and storage by giving it a proper color. This is particularly essential in the confectionery industry, where attractive visibility is a crucial factor in attracting customers. By using natural colors especially from Monotheca buxifolia, producers can not only help in the improvement of the visual appearance of their products but also prefer the consumer demands for natural ingredients as an alternative to synthetic additives.

The CIE L* a* b* values analyzation for hard candies reveals that both the samples of SQ1 and SQ2 successfully appear the red-orange region of the color spectrum. SQ2 displayed higher L* value suggesting that this candy sample has a greater lightness in comparison to SQ1. In terms of chromaticity, SQ1 exhibited higher a* and b* values, indicating a stronger shade of red and yellow colors respectively. The closer proximity of SQ1 and SQ2 in established colors, such as Cognac (96.9% similarity) and Sienna (97.8% similarity), respectively, provide a context for understanding their visible characteristics. The specific color codes associated with SQ1 candy (#AC421C) and SQ2 candy (#A45F27) provide clear evidence for manufacturers in order to utilize these natural colors in their products.

The candy of SQ1 displayed a higher flavonoid content in comparison to SQ2. which exhibit higher appearances than the TFC of dry weight in hard candies, reported by48. While a higher TFC in bamboo candy bound phenolic extract was reported by49.

In SQ1 candy the TPC is significantly considered higher than that of SQ2 candy. The TPC reported by48 for hard candies, indicates considerably higher concentration in comparison to the observed one in both SQ1 and SQ2 candies in this study. The higher TPC is also reported by49 for bamboo candy bound phenolic extract.

The solubility analysis of the hard candies showed that utilization of natural colorants derived from Monotheca buxifolia fruit did not significantly change the characteristics of dissolution of the candies. Both SQ1 and SQ2 candies exhibit similar solubility times, suggests that further adding these natural colorants does not severely affect the entire solubility of the product. However50, studied that candy solubility was influenced by its ingredients, particularly the color.

The ash content analysis particularly in the hard candies reveals notable differences between the SQ1 and SQ2 samples, a higher ash content was reported for SQ1 candy. This finding is significant as ash content can improve mineral composition and also the quality of food products. The observable values in this reports are relatively low if we compare it to other reported findings in the literature, For example51, reported total ash contents for hard candies with distinct concentrations of the ethanol extract and red ginger. These values are notably lower than those found in both SQ1 and SQ2. While a greater an ash content is reported by52 in calamondin fruit candy.

In this study, both SQ1 and SQ2 candies’ moisture content fall within the typical range for hard candies, reported to be between 1% and 2%53. While in comparison to other studies51, reported total water content in hard candies with distinct concentrations of ethanolic extract of red ginger, showing significantly lower moisture levels than those found in this study. Additionally52, revealed that moisture content in calamondin fruit candy, which closely aligns with those values significantly obtained for SQ1. In comparison54, reported a higher moisture content in hard candies containing Kencur essential oil.

The antibacterial activity evaluation in candies against several bacterial strains showed interesting insights into their effectiveness. The discussion reveals that SQ1 candy reported the strongest antibacterial activity against S. aureus. This is reported as higher zone of inhibition than SQ2 candy. Additionally, SQ2 candy showed moderate activity against EPEC. However, despite showing promise against S. aureus and EPEC both SQ1 and SQ2 candies did not exhibit any measurable zone of inhibition against APEC. In contrast, hard candies containing variable amount of Kencur essential oil showed significantly lower antibacterial activity especially against S. aureus, as reported by54.

The antifungal activity assessment in candies reported that neither SQ1 nor SQ2 indicates any inhibitory effects against common fungal strains; Aspergillus fumigatus, Aspergillus niger, and A. flavus. Alternatively, previous research reported the effectiveness of natural extracts, such as Moringa oleifera leaf extract, as antifungal agents55. reported that Moringa oleifera leaf extract show resistance against Candida pneumoniae. This claim the potential for certain plant extracts having a significant antifungal activity, which was not observed in present candy formulations.

Materials and methods

Extraction of natural colors

The fresh fruits of Monotheca buxifolia were bought from a local fruit shop in Nowshera, Pakistan. The fruits were identified by taxonomist Dr. Muhammad Qasim Hayat, ASAB (Atta-ur-Rahman School of Applied Biosciences), NUST (National University of Sciences and Technology), Islamabad. It was identified by comparing with the plant specimen present in NARC (National Agricultural Research Centre) herbarium, Islamabad, with voucher specimen no. 100,882. Its local botanical description is also available at flora of Pakistan (http://legacy.tropicos.org/Name/50324818?projectid=32). Initially, the fresh fruits were washed with tap water to remove any dirt and adhering materials, and then the seeds were removed from the fruits. The pulp of the Monotheca buxifolia fruit was then dried in a food dehydrator at 45 °C for 92 h. Once dried, the pulp was finely ground using an electric grinder to form a fine powder, which was then sieved through a 0.074 mm mesh size sieve. The powdered sample was stored in a jar at room temperature for further use.

Two natural colors, SQ1 and SQ2, were extracted from this powdered pulp using two different extraction methods: extraction method 1 which we referred to as aqua-enhanced extraction and extraction method 2, maceration, respectively. These extracted colors were further subjected to chemical analysis and utilized in hard candies to compare their properties. All experimental activities were repeated at least three times to minimize errors and ensure the reliability and reproducibility of the results.

Gravimetric analysis

Once the extraction process was completed, samples were taken from both the aqua-enhanced extraction and maceration methods. The filtration of impregnated extracts was carried out, and then the extracts were transferred to clean, dry glass dishes that had been pre-weighed. Then the drying process of the extracts was carried out in hot-drying oven until all the water had evaporated, leaving only the extract behind. Subsequently, the cooling process was carried out in a desiccator and the weight was recorded. The drying, weighing and cooling processes were repeated twice until a considerable weight of the extract was achieved36.

Percentage yield was measured using the following formula:

$$\:Yield\:\%=\frac{Weight\:of\:extract\:after\:drying}{Weight\:of\:dry\:sample}\times\:100\:$$
(1.1)

The improvement in percentage due to aqua-enhanced extraction method was calculated using the following equation:

$$\:\%improvement\:due\:to\:aqua\:enhanced\:extraction=\frac{\%\:yield\:of\:aqua\:enhanced\:extraction\:process-control}{\%\:yield\:of\:control}$$
(1.2)

This equation compared the weight of the extract obtained using aqua-enhanced extraction method with the weight of the extract obtained through maceration. By employing aqua-enhanced extraction technology, we were able to observe the differences in weight, expressed as a percentage, which indicated the improvement in the yield of extraction.

Ash test

The analysis of ash content was utilized to determine the minimum percentage of essential minerals, including potassium, calcium, phosphorus, magnesium, zinc, and iron, which are important for various physiological functions in the human body. The procedure adapted for this test was outlined in the AOAC Official Method 942.05 and ISO 5984:2022.

In the analysis of ash, a dried sample weighing 1 g was homogenized to evaluate the sample weight (Ws). The dry sample was then placed in a pre-weighted porcelain crucible and heated in a muffle furnace at 600 °C for consecutive 2 h till all organic material was burnt off, leaving only the mineral content. The crucible containing the ash was subsequently cooled in a desiccator before being weighed to determine the final weight (W2).

The percentage of ash in the food sample was calculated using the following formula:

$$\:Ash\:content=\frac{W2-W1}{Ws}\times\:100\%$$
(1.3)

In this equation, 2 represented the weight of the crucible with the ash, W1 was the weight of the empty crucible, and Ws was the weight of the dry sample.

Anthocyanin Estimation

The TAC of natural color extracts was determined using the pH differential method as described by56. A 10 ml volumetric flask was used to hold the crude anthocyanin extract, and the final volume was adjusted to 0.025 M potassium chloride buffer at pH 1.0. Concurrently, another 10 ml volumetric flask was prepared by filling it with 1 mL of extract and 9 mL of 0.4 M sodium acetate buffer, adjusting the pH upto 4.5. The absorbance of the samples was measured at 510 and 700 nm, diluted with pH 1 and pH 4.5 buffers, respectively, using a UV-visible spectrophotometer. TAC was expressed as mg of cyanidin-3-glucoside equivalents per 100 g of dry sample and calculated using the formula:

$$\:TAC\left(\frac{mg}{100g}\right)=\frac{\text{A}\text{x}\text{M}\text{W}\text{x}\text{D}\text{F}\text{x}1000}{\epsilon\:\text{x}1}$$
(1.4)

In this equation, represents absorbance, W (the molecular weight of anthocyanin) is 449.2 D; DF is the dilution factor; e (cyanindin-3-glucoside molar absorbance) is 26,900 L mol−1 cm−1 and L (the cell path length) is 1 cm.

Flavonoid Estimation

The total flavonoids in the samples were estimated using the aluminum chloride method as described by57. To 100 µL of the extracted sample, 400 µL of methanol was added to dilute its concentration. Additionally, 100 µL of 1 M sodium acetate and 100 µL of 10% aluminum chloride solution were added, and the mixture was placed in dark at room temperature for 45 min. The absorbance of the developed color was then read at 415 nm using a spectrophotometer. Quercetin was utilized as a standard to calculate the concentration of flavonoids in the sample.

Phenolic Estimation

The estimation of total phenolic was carried out using a modified FC method as outlined by57. A dilution of 50 µL of the extracted sample was performed with 450 µL of distilled water, followed by addition of 150 µL of FC reagent, which had been diluted with distilled water keeping ratio 1:1 and vortexed. Subsequently, 500 µL of 20% (w/v) Na2CO3 was added, and the mixture was incubated in the dark for 1 h. With the help of spectrophotometer, the absorbance of the developed colour was measured at 650 nm. For the determination of phenolic content in the sample, gallic acid was used as a standard.

Carbohydrate Estimation

By following the method of57 carbohydrate quantification in the samples was carried out with little modification57. A 0.1 g sample was combined with 5 mL of 2.5 N HCl, heated in a boiling water bath for 3 h, after which it was neutralized with sodium carbonate. The mixture was diluted to 25 mL with distilled water and centrifuged at 5000 rpm for 5 min. The supernatant (10 µL) was mixed with distilled water (90 µL) and treated with 100 µL of 5% phenol, followed by 500 µL of 96% sulphuric acid. After thorough mixing, the solution was left to incubate at room temperature for 30 min. Subsequently, the absorbance was measured at 490 nm using a spectrophotometer against a blank, which consisted of all reagents except the extract added to 100 µL of distilled water. Sucrose was used as the standard to determine the carbohydrate content in the samples.

Phytochemical screening

The phytochemical screening evaluation of natural extracted colors was conducted following the standard procedure outlined by58 to identify several active constituents, particularly flavonoids, phenols, leucoanthocyanins, triterpenes, steroids, amino acids, sterols and carbohydrates.

UV-visible spectrum analysis

Using a T80 + UV/VIS Spectrophotometer, the extracted natural color’s UV-visible absorbance spectrum was obtained, covering a wavelength range from 200 to 1100 nm. Peak values of the spectrum were recorded for analysis.

FTIR analysis

FTIR is an analytical technique widely used for identification and characterization of organic and inorganic compounds. FTIR provided valuable information regarding the molecular structure, functional groups and chemical bonds of complex samples. This non-destructive method is highly sensitive and capable of analyzing a wide variety of sample forms, making it essential in several scientific disciplines, including pharmaceuticals, environmental analysis, chemistry, materials science, and forensic investigations59. FTIR allowed for the identification of different types of functional groups present in the samples through graphical representation. On the basis of the absorption on certain wavelength spectrum FTIR facilitated the detection of various functional groups. The detection process typically involved scanning in the infrared range from 400 to 4000 cm− 1 with a resolution of 4 cm− 1.

Cytotoxic activity

The cell lines of HEK293 were taken out from the cell culture bank of Atta-Ur-Rahman School of Applied Biosciences, National University of Science and Technology (NUST), Islamabad, Pakistan. The culturing of cells was carried out in Dulbecco’s modified Eagle’s medium (DMEM) usually contains 4.5 g/L glucose, 1% penicillin and streptomycin solution, and 10% fetal bovine serum (FBS) in a humidified incubator, temperature set at 37 °C with minimum amount up to 5% carbon dioxide.

The assessment of MTT consists of the evaluation of the metabolic activity of the living cells and the most common technique utilize for measuring the cytotoxicity of any substance. The principle behind this assessment is to reduce the reagent of MTT to insoluble formazan crystals by viable cells, and hence, the measuring of cellular viability is carried out. In this study, to check cytotoxicity of both the extracted natural colors, MTT assay was carried out against the HEK293. They were added in a humidified incubator (having 5% CO2 at 37 °C) in 96-well culture plate at a density of 1 × 103 cells per well. When cells adhered after completing 24 h of post plating, 100 µL of different amounts of natural colors (10, 20, 40 and 60 µg/mL) were added and then incubated for 48 h. After 24 h of addition of the drugs, the checking of cytotoxicity was carried out by the addition of 5 mg/mL MTT solution prepared in 15 µL of phosphate-buffered saline (PBS) (BIO BASIC CANADA INC.) to each well and further incubated for 3 h. Moreover, supernatant was disposed off and then, to completely dissolve formazan crystals 100 µL dimethyl sulfoxide (DMSO) was added to all the wells and incubated again for 30 min. With the usage of micro plate reader (BIO-RAD PR4100), at a wavelength of 550 nm the optical density was measured. From the obtained data of absorbance, % cell viability was calculated using the following equation60.

$$\:\%\:age\:of\:cell\:viability\:=\left(\frac{\text{A}\text{s}\text{a}\text{m}\text{p}\text{l}\text{e}\:-\:\text{A}\text{b}\text{l}\text{a}\text{n}\text{k}}{Acontrol\:-\:Ablank}\right)\times\:\:100$$
(1.5)

Antibacterial activity

The antibacterial activity of the natural color extracts was estimated against different bacterial strains. The experiment was performed following the procedure described by61. Materials used in this experiment included lysogeny broth (LB) broth, LB agar, Petri dishes, standard antibiotics (ciprofloxacin), DMSO, sterile metal borer, sterile cotton swabs, micropipettes, test tubes, autoclave, laminar flow hood, and incubator.

Well diffusion method was used to assess the antibacterial activity. The cultivation of Gram-positive Staphylococcus aureus and Gram-negative E. coli; APEC and EPEC is been carried out in LB medium under shaking conditions at 37 rpm and 37 °C for consecutive 4 h. LB media was prepared by mixing 36 g of solid LB agar in 1000 ml of distilled water. The laminar flow was cleaned with 70% ethanol spray for sterilization. The media, sterile metal borer, sterile cotton swabs, micropipettes, and test tubes were autoclaved at 121 °C for 15 min. The melted LB agar was cooled to 40 °C, and 20 ml was poured into each Petri dish. After the media solidified, the bacterial culture was spread on the surface using a sterile cotton swab, and wells were bored using a sterile borer with a 24 mm spacing. Stock solutions were prepared by mixing DMSO at concentrations of 10, 20, and 30 mg/ml; 90 µl were added to each well. Novidat was used as a standard, with 90 µl added to a separate well. The Petri dishes were incubated at 37 °C for 24 h, and the inhibition zones around the wells were measured in millimeters.

Antifungal activity

Antifungal activity was evaluated against different fungal strains following the procedure described by62. The materials used in this experiment included potato dextrose agar (PDA), nutrient broth, standard antibiotics (ciprofloxacin), DMSO, Petri dishes, sterile metal borer, sterile cotton swabs, micropipettes, test tubes, autoclave, laminar flow hood, and incubator.

The antifungal activity was assessed using the well diffusion method with fresh fungal cultures. Stock solutions were prepared for all samples at concentrations of 10, 20, and 30 mg/ml of DMSO. PDA media was prepared by mixing 39 g of PDA powder in 1000 ml of distilled water. The laminar flow was cleaned with a 70% ethanol spray for sterilization. The PDA growth media, sterile metal borer, sterile cotton swabs, micropipettes, and test tubes were autoclaved at 121 °C for 15 min. After cooling to 40 °C, 20 ml of PDA was poured into each Petri dish to solidify. Once solidified, the fungal culture was inoculated on the surface using a sterile cotton swab, and wells were bored using a sterile borer with a spacing of 24 mm. 90 ml of the stock solution were added to each well. Novidat was used as a standard control with 90 ml added to a separate well. The Petri dishes were incubated at 37 °C for a week, and the inhibition zones were recorded in millimeters.

Applications in food industry

Extracted natural colors were used in food product (hard candies). Optimized conditions were used to incorporate specific quantities of natural colors into the samples to assess their stability and impact on the product’s physical appearance. The products were evaluated immediately after the addition of the colors, examining changes in color and its physicochemical properties.

Hard candy

Following the method of50, hard candy was prepared with slight modifications. At first, 45 g of corn syrup was combined with 55 g of sugar and 12.5 ml of water, and the mixture was boiled on hotplate until its temperature reached 140–150 degrees. The cooling process of the mixture was conducted at 105 degrees before adding 0.5 g of citric acid and 0.45 g of natural color. After preparing the mixture, it was poured into molds and left at room temperature to set. Once the solidification of hard candies done, their color was accurately analyzed with the help of ImageJ software, allowing for a precise assessment and comparison of color properties of the candies.

BRIX analysis

The determination of the Brix level was carried out with the help of refractometer. The samples were prepared by using 0.1 g in 1 ml of solvent. The BRIX value of all samples was calculated using the formula:

$$\:\%\:Water\:Soluble\:Content\:\left(\frac{g}{100\:mL}\right)=\:\frac{B\times\:V}{S}$$
(1.6)

Where.

B: The degree of BRIX detected in the diluted sample.

V: The volume in which the sample was diluted (ml).

S: Sample amount (g).

Solubility time analysis

The time taken for the candies to show solubility was measured using a method described by50. A measurable sample of 5 g was then placed in a glass beaker and dissolved in 25mL of distilled water, with heating conducted on a hot plate set to a temperature of 30 ± 2 °C, while being stirred constantly at 400 rpm. The time taken for the candy to completely dissolve was recorded as the solubility time in minutes.

Color analysis

The color of the samples (SQ1, SQ2 and hard candies) was measured using ImageJ software, following the procedure outlined by50. The color values were expressed as RGB values, which were then converted into L* a* b* values. Samples were photographed using an iPhone set to food mode at a constant distance of 15 cm above the sample. The photography was conducted in a specially designed box to eliminate unwanted external light. The image files were analyzed using ImageJ software.

Statistical analysis

Statistical analysis was carried out using GraphPad Prism. To check if there were significant differences between the SQ1 and SQ2, the data was analyzed using one-way and two-way ANOVA with Tukey’s test at a significance level of p < 0.05. All results are presented as average ± standard deviation.

Conclusion

In the present study, natural colors were extracted from the fruit of Monotheca buxifolia, a plant widely distributed in Khyber Pakhtunkhwa and Balochistan in Pakistan, proposing a sustainable and eco-friendly dyeing solution for the food industry. This research delves into the dye-yielding chemical nature of Monotheca buxifolia by extracting and analyzing the natural colors from the fruits through phytochemical screening, UV-vis spectrophotometry, FTIR, assessing antibacterial and antifungal activity. Gravimetric analysis indicates that among both of the extraction methods, the aqua-enhanced extraction method yields a high percentage, followed by maceration extraction. The natural color extracted via the aqua-enhanced extraction demonstrates high ash content, flavonoid, phenolics, and antibacterial properties, surpassing the natural color extracted by maceration. Biochemical assays reveal that SQ1 has high ash content, carbohydrates, and phenolics, along with a high flavonoid content, while SQ2 exhibits a high anthocyanin content.

In this study, natural colors were not only utilized in various food product but also tested for stability. Both natural colors were used in hard candies. Color efficiencies were evaluated through color analysis, moisture content, ash tests, estimation of flavonoids and phenolics, BRIX value, solubility time, antibacterial, and antifungal activity. A comparison of both candies reveals that SQ1 candy has higher moisture, ash, flavonoid, and phenolic content. Both candies exhibit similar BRIX values and solubility times, with SQ1 candy showing the highest zone of inhibition against S. aureus bacteria. The study results indicate that both candies lack antifungal properties. CIE L* a* b* C* values indicate that both shades of natural colors generally fall within the reddish-orange area, while the shades of hard candies lie in the red-orange areas. Color values can be altered by varying the concentration of natural color, allowing for the production of a range of shades. This study indicates that SQ1 shows better results than SQ2.

The primary advantage of using these natural colors is to mitigate the spread of severe diseases among humans while reducing environmental pollution. Additionally, these colors can offer significant health benefits in treating kidney, liver, urinary diseases, hepatoprotective, and antibacterial issues, promoting a healthier lifestyle across different populations. The study results highlight that extracting and utilizing natural colors from the fruit of Monotheca buxifolia can enable the food sector to adopt sustainable and eco-friendly food coloring processes, potentially enhancing exports to developed countries where the use of hazardous synthetic dyes is prohibited.