DOI:
10.1039/D5RA07229H
(Paper)
RSC Adv., 2025,
15, 51027-51039
Smartphone-based colorimetric detection of milk adulteration via an AgNP/AuNP/TMB-AuGel sensor array and multivariate analysis
Received
23rd September 2025
, Accepted 9th December 2025
First published on 19th December 2025
Abstract
In this study, a novel colorimetric sensor array composed of three nanomaterial-based sensing elements—silver nanoprisms (Ag Prism), gold nanoparticles (Au NPs), and a TMB-Au hydrogel (TMB–Au Gel)—was developed to identify and discriminate between three major milk adulterants: hypochlorite (ClO−), hydrogen peroxide (H2O2), and dichromate (Cr(VI)). The sensing elements were optimized in terms of nanoparticle volume ratios, reagent concentrations, and reaction time to achieve distinct and reproducible color responses. Smartphone-based imaging captured these changes, and RGB values were extracted for analysis. The sensor responses exhibited good reproducibility, with relative standard deviations below 5% across five replicate measurements (Cr(VI): 2.8%, ClO−: 4.3%, H2O2: 1.2%). The limits of detection were 0.62, 0.02, and 0.03 mmol L−1 for H2O2, ClO−, and Cr(VI), respectively. Recovery tests in spiked milk samples confirmed the reliability of the system (H2O2: 100–106%, ClO−: 99–112%, Cr(VI): 103–115%). Pattern recognition analysis using linear discriminant analysis and hierarchical cluster analysis revealed excellent discrimination between the three adulterants, with the first two discriminant functions explaining 100% of variance (LD1: 56%, LD2: 44%) and producing clearly separated clusters. Leave-one-out cross-validation yielded an overall classification accuracy of 81%, with sensitivities ranging from 0.74% to 0.94%, specificities from 0.84% to 0.97%, and precisions from 0.75% to 0.93%. Analysis of loading plots highlighted the significance of the green channel in Au NPs and the blue channel in TMB–Au Gel for differentiating adulterants. These findings demonstrate that by integrating smartphone-based imaging for RGB extraction, the method allows for on-site, real-time analysis without specialized equipment. This capability enhances practical food monitoring, enables early detection of contaminants, and offers a user-friendly platform to improve food safety and support public health initiatives.
1 Introduction
Tackling milk adulteration is crucial for protecting public health, maintaining nutritional quality, preserving consumer trust, ensuring economic stability, and strengthening regulatory enforcement. Milk adulteration can be classified into three main types: Chemical, intentional, and incidental adulteration. Chemical adulteration is particularly concerning, as these substances are commonly employed to conceal signs of spoilage, prolong shelf life, or artificially modify the natural composition of milk. Some of common chemical adulterations include hydrogen peroxide (H2O2, prevent spoilage), formaldehyde (preservative), detergents (create artificial froth), urea (increase nitrogen content), hypochlorite (ClO−) and dichromate (Cr(VI)) (prevent microbial growth and spoilage).1 However, exposure to these substances can pose serious health risks. Preservatives such as H2O2 and ClO− can cause gastritis and intestinal inflammation due to their oxidative and irritant effects, while exposure to Cr(VI) is associated with systemic toxicity and carcinogenic risks.2 According to international food-quality standards and relevant regulatory guidance, the intentional addition of such chemical preservatives or non-native compounds to milk is not permitted; therefore, their presence, even at very low concentrations, is considered adulteration and a food-safety concern.3 The issue of milk adulteration, particularly in cow milk, demands attention because of its widespread consumption and versatility in various dairy products, which increases the risk of exposure to harmful substances and diminishes consumer confidence in milk quality.4,5
Screening methods in adulteration studies, particularly for milk, are preliminary tests intended to quickly identify the presence of adulterants.6 These methods are generally simpler and faster than more complex analytical techniques, serving as an initial detection step, and after which the suspected samples undergo detailed analytical testing using advanced methods such as high-performance liquid chromatography or gas chromatography-mass spectrometry to accurately identify and quantify the adulterants present, which leads to the interpretation of findings and informed decision-making. Screening method based on optical readout techniques are widely available, simple to use and offer rapid detection for ensuring quality control.
Colorimetric methods are commonly used as optical detection methods in analytical chemistry. Their simplicity, cost-effectiveness, and ability to provide rapid results make them useful for preliminary screening. To enhance their effectiveness, the integration of chemometric tools can significantly improve the analysis by allowing for more sophisticated data interpretation, pattern recognition, and quantification of adulterants.7,8 By applying multivariate statistical techniques to colorimetric data, researchers can better distinguish between genuine and adulterated products, thus augmenting the reliability of these straightforward methods for food safety assessments.
One commonly employed colorimetric method is the H2O2-3,3′,5,5′-tetramethylbenzidine (TMB) system for detecting target analytes. This method utilizes TMB as a chromogenic substrate, which, in the presence of H2O2 and a catalytic compound, undergoes oxidation to produce a distinct blue color. Harsha et al. have reported a point-of-care biosensor using a streptavidin–horseradish peroxidase (HRP)–TMB assay for H2O2 detection in cow milk, achieving a detection limit of 0.04% (v/v) and up to 95% accuracy.9 Traditionally, HRP has been used as the catalyst to enhance this reaction. While effective, these traditional enzymatic assays can be complemented or replaced by catalytic materials, such as metal-based nanoparticles. For instance, Wen et al. developed a CuFe2O4/rGO-based peroxidase-like nanozyme with excellent catalytic activity, demonstrating its potential for Cr3+ detection in a colorimetric assay. Their study highlights the advantages of nanozymes in improving reaction efficiency, reducing dependence on H2O2, and providing a more stable and cost-effective alternative to enzymatic methods.10
Colorimetric studies using nanoparticles, particularly gold nanoparticles (Au NPs) and silver nanoparticles (Ag NPs), facilitate colorimetric detection by exploiting localized surface plasmon resonance (LSPR), which yields a detectable color shift upon interaction with target adulterants.11–13 Lin et al. developed a colorimetric device for visual monitoring of food spoilage using a sensory hydrogel that incorporates Au nanorods and silver nitrate. Hydrolysis of resorcinol monoacetate in the presence of biogenic amines results in Ag NPs deposition on the Au nanorods, with color changes indicating spoilage degree. The sensor effectively monitored actual food samples, including fresh beef and salmon, under various storage conditions.14 Sharmila et al. developed a cellulose-based hydrogel sensor using Au NPs for selective detection of melamine. The sensor exhibits a color change from orange-red to purple upon melamine addition, related to LSPR. With a detection limit of 3 × 10−7 mol L−1, this study underscores the sensor's potential for ensuring milk safety.13
Recent developments have also introduced colorimetric sensor arrays capable of simultaneously detecting multiple adulterants by capturing the combined responses of various sensing elements and generating unique patterns for each analyte.15 Most studies on milk analysis, however, have primarily focused on proteins, melamine, or volatile compounds using conventional colorimetric or fluorescence-based sensing methods.16,17 Only a limited number of investigations have employed colorimetric sensor arrays, demonstrating the potential of multi-element sensing for simultaneous detection and pattern recognition of chemical adulterants in milk.15,18,19 However, Costa's method detects each chemical adulterant through separate specific tests and smartphone-based PLS analysis, without employing a cross-responsive sensor array.20 Considering the importance of simultaneous identification of multiple chemical adulterants in milk, studies remain limited. Therefore, in this work, a nanomaterial-based colorimetric sensor array was developed to generate distinct response patterns for the detection of H2O2, ClO−, and Cr(VI) in cow milk. Metal nanoparticles including Ag prisms, Au-hydrogel (Au-Gel), and Au-NPs were synthesized to produce distinct color changes under ambient light and temperature in the presence of these adulterants. The resulting colorimetric responses were analyzed using digital imaging and chemometric methods, enabling fast, portable, and semi-quantitative detection. This approach provided a practical solution for efficient monitoring of milk safety and addressed a critical gap in the detection of chemical adulterants in dairy products.
2 Experimental
2.1. Materials and apparatus
All reagents were of analytical grade and used without further purification. Silver nitrate, polyvinylpyrrolidone, H2O2 (30%), sodium alginate, tetrachloroauric acid (HAuCl4), agarose, sodium borohydride, ascorbic acid, sodium hypochlorite (NaClO, 10–15%), and potassium dichromate (K2Cr2O7), disodium hydrogen phosphate (Na2HPO4), sodium dihydrogen phosphate (NaH2PO4) and TMB were purchased from Merck (Darmstadt, Germany). Authentic (unadulterated) raw cow milk was obtained from a reliable dairy shop. Distilled water was used for dilution in all experiments.
Samples were loaded to 96-wellplates (SPL Life Science Co., Ltd, Korea). UV-Vis absorption spectra were recorded with a Shimadzu UV-Vis spectrophotometer (UV-1800, Kyoto, Japan). Transmission electron microscopy (TEM, Philips CM120, operated at 430 kV) was used to characterize the synthesized nanoparticles. Dynamic light scattering (DLS) measurements and zeta potential analysis were carried out by using Zeta sizer Nano ZS90 (Malvern Instruments, Malvern, UK). All experiments were performed at room temperature.
To perform color analysis, sample photos were captured using an iPhone 13 (iOS 17.2.1) featuring a 12-megapixel camera with lens aperture of f/1.6, 26 mm equivalent focal length for wide-angle shots, and sensor size of 1/9 inches. Photos were taken under consistent lighting conditions, from the same distance, and covering equally sized areas. RGB intensity values were extracted with the Color Picker App (the iOS version).
2.2. Synthesis of sensor elements
2.2.1. Silver nanoprisms (Ag Prism). Ag Prism synthesis was carried out according to the method described by Zarghampour et al.21 In this procedure, an aqueous solution containing silver nitrate (0.1 mmol L−1, 25 mL), polyvinylpyrrolidone (0.7 mmol L−1, 1.5 mL), trisodium citrate (30 mmol L−1, 1.5 mL), and H2O2 (30 wt%, 1.5 mL) was prepared and stirred vigorously at room temperature. Sodium borohydride (100 mmol L−1, 250 µL) was then added rapidly to the solution until the solution turned pale yellow. After 30 min, the solution turned deep yellow and then deep blue, indicating the successful formation of Ag Prism.
2.2.2. Au-gel. Au-Gel synthesis was performed following the protocol outlined by Karimzadeh et al. using a biopolymer blend of sodium alginate and agarose.22 For this purpose, sodium alginate solution (0.7 mol L−1, 10 mL), and agarose (0.05 mol L−1, 10 mL) were heated up to 90 °C and stirred vigorously for 15 minutes. HAuCl4 solution (0.5 mmol L−1, 2 mL) was added dropwise to the mixture. Then, sodium borohydride (100 mmol L−1, 100 µL) was quickly added to the solution until the color of the solution changed to deep red after 30 minutes. The resulting solution was allowed to reach room temperature and subsequently stored at 4 °C.
2.2.3. Spherical Au NPs. To synthesize spherical Au NPs, a modified version of the method reported by Xavier et al. was used.23 10 mL of HAuCl4 solution (5 mmol L−1) was prepared and stirred vigorously at 90 °C to ensure proper mixing. To initiate the reduction process, 10 µL of ascorbic acid solution (100 mmol L−1) was added dropwise while maintaining continuous stirring. Ascorbic acid acted as a mild reducing agent, facilitating the conversion of Au3+ to Au0 and promoting controlled nucleation of the Au nanoclusters. The solution changed from colorless to red-brown after a few minutes. The reaction mixture was allowed to proceed under this condition for 30 min.
2.3. Design and construction of colorimetric sensor array
A colorimetric sensor array with a 3 × 3 configuration was designed, incorporating three different sensor elements (Ag Prism, Au-NPs, and the TMB/Au-Gel system) and applied to detect three different analytes (adulterants): ClO−, H2O2, and Cr(VI). The schematic of the proposed sensor array is presented in Fig. 1. Each analyte was tested with all three sensor elements to evaluate the response pattern and ensure discrimination capability.
 |
| | Fig. 1 Detailed schematic of the proposed sensor array configuration and operational steps. | |
Before conducting the full set of experiments, the optimal amount of each sensor element was determined to generate the strongest signal at the lowest analyte concentration. All experiments were carried out in a standard 96-well plate with its lid, each well containing a total volume of 40 µL. This included 15 µL of analyte solution and 20 µL of the sensor element, along with 5 µL of phosphate buffer (0.1 mmol L−1, pH = 7) prepared using Na2HPO4/NaH2PO4 to maintain consistent pH and buffer capacity. For the Ag Prism and AuNPs-based sensors, 20 µL of the respective solution was directly added as the sensor component. For the TMB/Au-Gel system sensor, which consists of two separate components, the sensor solution (20 µL) included 15 µL of Au-Gel and 5 µL of TMB (3 mmol L−1). Spiked milk samples were prepared by adding specific amounts of the analytes to fresh milk diluted 50-fold (purchased from local markets). This approach allowed evaluation of the sensor array's ability to distinguish between milk samples contaminated with varying concentrations of each adulterant. The photometric measurement of samples was conducted using a smartphone within a 15 × 15 × 15 cm custom darkroom box with white-lined walls. The box was equipped with a 15 cm dual-line cool-white light-emitting diode (LED, SMD 5730 type, 12 V DC) bar powered via an AC–DC adaptor to uniformly illuminate samples positioned at the center. The smartphone camera was fixed 9 cm above the sample in a vertical orientation to ensure consistent RGB imaging, and measurements were repeated at multiple time intervals.
2.3.1. Data evaluation. The average RGB values of each sensor can be easily extracted using image analysis software with a color picker® tool. The same process was also carried out on the blank experiments. The difference in each color channel was determined before and after the reaction using following equations:Herein, the subscripts S and B show the sample and blank images. Furthermore, the overall color change was quantified using the Euclidean distances (EDs) in the RGB color space:
Also, the total EDs for sensor array was calculated by the summing the individual ED values derived from three sensing elements.
Prior to analysis, the data matrix composed of the color change values (ΔR, ΔG, ΔB) was mean-centered to enhance model performance.24 Color difference images were created in Microsoft PowerPoint, version 2013 based on averaged absolute RGB changes for visualization. Linear discriminant analysis (LDA) and hierarchical cluster analysis (HCA) were utilized as chemometric tools for data analysis. Statistical analyses were performed using SPSS software, version 22.0. Further analyses were executed using MATLAB 2014 with the classification toolbox 5.4. To ensure the reliability of the model, we calculated parameters such as (True-positive (TP)/TP + False-negative), specificity (True-negative (TN)/TN + False-positive), and accuracy (TP + TN/total sample size).
3 Results and discussion
3.1. Characterization of sensor elements
Characterizations of Ag Prism, Au-Gel and Au-NPs was carried out to confirm its structure and properties (Fig. 2). The optical properties of the synthesized nanomaterials were characterized by UV-Vis spectroscopy, revealing distinct absorption features consistent with variations in composition, morphology, and LSPR behavior. The UV-Vis spectrum of the Ag-prism sample displayed a broad absorption band in the range of 500–800 nm, characteristic of out-of-plane plasmonic modes in anisotropic Ag nanostructures (e.g., prisms or plates). This optical signature aligned with prior reports on Ag Prism.25 Au-Gel exhibited a distinct LSPR peak at 530 nm, characteristic of spherical Au NPs with diameters in the 20–40 nm range.26 The Au NPs exhibited also an LSPR peak at 530 nm, confirming spherical particle shape.22 However, the Au-Gel showed a broader peak and elevated background absorption, indicating that the gel environment introduces additional effects.
 |
| | Fig. 2 UV-Vis spectra, DLS profiles, and TEM images of Ag Prism (right column), Au-Gel (middle column), and Au-NPs (left column), along with their corresponding visible colors. | |
TEM analysis revealed the presence of Ag NPs with prism- and triangular-shaped morphologies, indicative of anisotropic growth during the synthesis process. The particle size distribution showed a mean particle diameter of approximately 33 nm for Ag Prism NPs. Also, for both Au-Gel and Au-NPs, TEM analysis confirmed the successful synthesis of well-defined, spherical nanostructure. The average particle size of Au-NPs and Au-Gel were approximately 20 nm. DLS measurements were conducted to determine the hydrodynamic size and size distribution of the three synthesized nanoparticle systems. DLS analysis showed particle sizes in the range of 20–32 nm for all three. Notably, all synthesized nanoparticles exhibited a polydispersity index (PDI) of 0.3–0.5, indicating a moderate level of size distribution heterogeneity. The initial zeta potential measurements confirmed the colloidal stability of the synthesized nanoparticles. The zeta potential values were significantly altered upon the addition of adulterants, i.e., for Ag Prism (from −21.4 mV to −29.0 mV with H2O2, −9.3 mV with ClO−, and −24.0 mV with Cr(VI)), for Au-NPs (from −20.1 mV to −22.7 mV (H2O2), −17.5 mV (ClO−), and −25.2 mV (Cr(VI))) and for Au-Gel (from −17.6 mV to −20.8 mV (H2O2), −10.5 mV (ClO−), and −23.0 mV (Cr(VI))). These results confirmed effective and distinct interactions with the targeted adulterants.
3.2. Sensing principle
The colorimetric response of Ag Prism in the presence of H2O2 can be attributed to the oxidative etching and morphological transformation of the nanoparticles. Ag Prism exhibited a blue color due to their specific LSPR, which is sensitive to their shape and size. When H2O2 was introduced, it induced oxidative etching of the Prisms, leading to a change in their morphology (from prisms to smaller particles) and a blue shift in the LSPR, resulting in a progressive blue shift of the in-plane dipole plasmon resonance peak and distinct color change blue to purple.27,28 As the concentration of H2O2 increased, further etching occurred, causing the Ag NPs to deform more significantly. This process led to a reduction in the number of nanoparticles and a shift in the LSPR to wavelengths that were no longer visible, resulting in a colorless solution. The entire process – from blue to purple to colorless – thus served as a direct visual indicator of H2O2-driven etching stages, with the final colorless state confirming total Prism disintegration.29,30 Also, Ag nanostructures have emerged as effective probes for ClO− detection due to their plasmonic etching-mediated optical changes. ClO− ions acted as oxidants, leading to the morphological changes in Ag Prism primarily through similar mentioned process.31,32
The next probe was based on the catalyst reactivity of Au-Gel for TMB in the presence of different oxidants—H2O2, ClO−, and Cr(VI)—to generate unique colorimetric fingerprints. Au-Gel exhibited peroxidase-like activity, catalyzing the oxidation of TMB by H2O2 to produce a characteristic blue product.33 Beyond H2O2, alternative oxidizers such as ClO− and Cr(VI) can also drive TMB oxidation, albeit with differing kinetics and spectral outputs. While Cr(VI) induced distinct color changes upon reaction with TMB, ClO− efficiently converts colorless TMB into a blue product even at trace levels (as low as 0.05 µmol L−1).34,35 This differential reactivity enabled the discrimination of H2O2, ClO−, and Cr(VI) based on reaction rates and spectral shifts, forming a cross-reactive “fingerprint” library for enhanced selectivity in complex samples.
Au-NPs, employed here as another colorimetric sensors, exhibited a measurable color change due to changes in their LSPR upon interaction with analytes. In this work, the observed color change in the presence of Cr(VI) likely suggested that ascorbic acid on the nanoparticles surface reduced Cr(VI) to Cr(III), subsequently induced Au-NPs aggregation—consistent with reported mechanisms in colorimetric detection systems.36
3.3. Sensor evaluation and dynamic sensor response study
The sensor evaluation process included optimizing the nanoparticles volume to achieve the best possible detection performance. This optimizing was crucial to ensure that the sensor exhibits maximum sensitivity at low analyte concentrations. To this aim, different volume (5, 10, and 20 µL) of Au-NPs and Ag Prism were tested at lowest analytes concentrations (H2O2: 5.4, ClO−: 0.34, Cr(VI): 0.085 mmol L−1). The 20 µL volume gave the highest ED and was selected as optimal sensor volume for Au-NPs and Ag Prism. To evaluate the effect of Au-Gel and TMB volume on EDs response in TMB/Au-Gel system, TMB volume was initially fixed at 5 µL while Au-Gel volume varied at 5, 10, and 20 µL. The highest response was observed at 15 µL of Au-Gel with 5 µL of TMB. Subsequently, with Au-Gel volume fixed at 15 µL, TMB volume was varied between 5, 10, and 15 µL, where maximum response corresponded to 5 µL of TMB and 15 µL of Au-Gel. The total sample volume was 40 µL. All sensor responses were conducted at fixed 120 seconds.
Then, we investigated the time-dependent behavior of sensor responses toward varying analyte concentrations, aiming to understand how sensor condition and reaction duration influenced the colorimetric response. Determining the time point at which the colorimetric response became stable or most distinguishable allowed for practical and accurate measurement—particularly in rapid or real-time sensing applications. Furthermore, as certain analytes may yield similar endpoint signals but followed distinct kinetic profiles, time-resolved analysis enhances system selectivity. By evaluating the overall EDs across different concentrations and time points, a consistent and discriminative readout time can be established to ensure reliable detection performance.
To achieve this goal, the regression coefficients obtained from linear regression analysis of the total squared ED versus concentration at various time points (up to 3 minutes) were evaluated (Fig. 3 and 4). The findings indicated a progressive decline in regression coefficients over time. Therefore, determining the optimal reaction time for the sensor array required identifying the shortest duration with a regression coefficient exceeding 0.9. According to the data, a reaction time of 60 seconds was selected for further experiments. The sensor array exhibited linear ranges with high correlation coefficients (R2 ≥ 0.9) for all tested analytes: H2O2 (5.4–108.0 mmol L−1, 0.98), ClO− (0.34–3.4 mmol L−1, 0.94), Cr(VI) (0.085–1.7 mmol L−1, 0.91). These results indicated reasonable correlation between EDs response and analyte concentration. Although the R2 values were relatively high, the system was more appropriately considered as a semi-quantitative tool under the studied conditions. The limit of detection (LOD) of H2O2, ClO−, and Cr(VI) were 0.62, 0.02, and 0.03 mmol L−1, respectively. The LOD were calculated using 3σ/m where σ is the standard error of background signal, m is the slope of the calibration curve. Recovery tests were performed by spiking milk samples with known amounts of H2O2 (21.6 mmol L−1), ClO− (2.01 mmol L−1), and Cr(VI) (0.85 mmol L−1), representing common adulterants. Each measurement was repeated five times. The obtained recovery values ranged from 100–106% for H2O2, 99–112% for ClO−, and 103–115% for Cr(VI), indicating that our sensor array is reliable for detecting and quantifying these adulterants in milk samples.
 |
| | Fig. 3 R2 values from EDs-concentration linear regression analysis over time for each analyte and sensor element. | |
 |
| | Fig. 4 Linear regression analysis between EDs and different concentrations level of studied milk adulterants (a) H2O2, (b) ClO−, and (c) Cr(VI). | |
The reproducibility of the colorimetric sensor array was evaluated by evaluating ED responses for the three studied milk adulterants. For the specific concentrations of each analyte shown in Fig. 5, the relative standard deviations (RSDs) were all below 5%, with values of 2.8% for Cr(VI) at 0.85 mmol L−1, 4.3% for ClO− at 2.01 mmol L−1, and 2.6% for H2O2 at 21.6 mmol L−1, confirming good reproducibility of the colorimetric responses across five repeated measurements.
 |
| | Fig. 5 The reproducibility of the response of sensor array for detection of milk adulterants (blue) 0.85 mmol L−1 of Cr(VI), (red) 2.01 mmol L−1 of ClO−, (green) 21.6 mmol L−1 of H2O2. | |
3.4. Colorimetric sensor responses
In this colorimetric sensor array, a color difference map was generated to visualize and highlight the color changes induced by each analyte, serving as a unique visual fingerprint of the interaction. This method enhanced the interpretability of sensor responses by localizing even subtle chromatic shifts, thereby improving sensitivity and analytical clarity. For each analyte—ClO− (0.34–3.4 mmol L−1), H2O2 (5.4–108.0 mmol L−1), and Cr(VI) (0.085–1.7 mmol L−1)—a specific concentration range was selected and tested at five defined levels. The lower limit for each range was defined as the minimum concentration at which a visible color change was reliably detected. The upper limits were chosen to encompass a wide response window for visual differentiation, ensuring each analyte could be distinctly profiled. This approach enabled effective analyte discrimination through pattern recognition, as the color difference maps acted like chemical fingerprints, capturing both the magnitude and spatial nature of the colorimetric response.
In Fig. 6, each colored spot represented the extent of color change in a sensor before and after interaction with an analyte. Bright or distinctly colored spots indicated a noticeable response, reflecting a significant chemical change upon exposure. In contrast, nearly black spots indicated a slight color change, while fully dark spots suggested no detectable change, meaning the sensor either did not respond or the response was too weak to observe visually. Accordingly, the TMB/Au-Gel system showed better overall performance compared to the other sensor elements for all three analytes, the color changes were clear and easily distinguishable. The Ag Prism sensor performed better for Cr(VI) while Au-NPs exhibited weaker visual response overall, but can still contribute to pattern recognition within the sensor array.
 |
| | Fig. 6 Color-difference maps of studied milk adulterants (a) H2O2, (b) ClO−, (c) Cr(VI) at different concentration levels. | |
3.5. Data analysis and colorimetric pattern recognition
Visual color changes in sensing arrays are often subtle or ambiguous, making them difficult to interpret by eye. However, applying pattern recognition techniques such as discriminant analysis (DA) or HCA can uncover hidden response patterns. These chemometric tools transform slight color variations into quantitative information, enabling reliable differentiation of analytes across varying concentrations. This strategy forms the basis of colorimetric pattern recognition and significantly improves the system's analytical performance.
3.5.1. HCA. HCA is an unsupervised multivariate technique used to classify samples based on their similarity. It computes inter-sample distances—commonly using the Euclidean metric—and organizes the data into a hierarchical structure via linkage algorithms. This structure is visualized as a dendrogram, where samples with greater similarity (indicated by shorter inter-sample distances) are grouped within the same cluster.37 In this study, HCA was employed to discriminate among three adulterants—H2O2, ClO−, and Cr(VI)—across five concentration levels, with each analyte measured in triplicate to assess clustering consistency. The dendrogram results from the HCA (Fig. 7) revealed that the samples were categorized into distinct clusters based on the analyte type and their concentration levels. The blue cluster included samples with varying concentrations of H2O2, which were classified independently from the other clusters. The green cluster predominantly represented samples containing ClO−, while the red cluster mainly consisted of Cr(VI) samples. The linkage between the red and green clusters suggested that the sensor exhibited similar colorimetric responses to Cr(VI) and ClO− within the examined concentration ranges, indicating underlying structural and functional similarities. The purple cluster, appearing distinctly and isolated in the dendrogram, corresponded to samples with high concentrations of H2O2. This distinct positioning reflected significant differences in the chemical characteristics and colorimetric response of the sensor array compared to other groups. The elevated H2O2 levels likely alter optical properties or reactivity, resulting in the formation of a separate cluster. Nevertheless, some instances of misclustering were observed, where certain samples were assigned to clusters that did not align with their primary analyte. This phenomenon may be attributed to physicochemical similarities between analytes at specific concentration levels or to their interactive effects on the sensor's performance. For instance, the presence of both ClO− and H2O2 samples at moderate concentrations within the green cluster, as well as the inclusion of Cr(VI) alongside low-concentration ClO− in the red cluster, were clear examples of such misclustering. These findings suggested that overlapping properties among analytes required careful data analysis to enhance the reliability of clustering and the accuracy of result interpretation.
 |
| | Fig. 7 HCA dendrograms of Analytes ClO−, H2O2, and Cr(VI) across five concentration levels. Subfigures show: L1: H2O2 (108.0 mmol L−1), ClO− (3.4 mmol L−1), Cr(VI) (1.7 mmol L−1); L2: H2O2 (54.0 mmol L−1), ClO− (2.01 mmol L−1), Cr(VI) (0.85 mmol L−1); L3: H2O2 (21.6 mmol L−1), ClO− (0.9 mmol L−1), Cr(VI) (0.34 mmol L−1); L4: H2O2 (10.8 mmol L−1), ClO− (0.7 mmol L−1), Cr(VI) (0.17 mmol L−1); L5: H2O2 (5.4 mmol L−1), ClO− (0.34 mmol L−1), Cr(VI) (0.085 mmol L−1). | |
3.5.2. LDA. LDA is an unsupervised linear classification method that separates samples by maximizing between-group variance and minimizing within-group variance. It uses linear discriminants that capture decreasing levels of variation, with classification mainly based on those explaining the most significant differences.38 The LDA model was further employed to evaluate the discriminatory capability of the colorimetric sensor array. The eigen analysis demonstrated that the first two discriminant components collectively explained 100% of the total variance (LD1: 55.8% and LD2: 44.2%), indicating that the full class-discriminative structure is preserved within a two-dimensional subspace. The score plot with 95% confidence ellipses, revealed clear and non-overlapping separation between classes. Furthermore, different concentration levels of each analyte were consistently grouped within their respective classes and were markedly distinct from other classes. As shown in Fig. 8, the within-class variance was lowest for H2O2, followed by ClO−, with Cr(VI) exhibiting the highest variance. The model achieved an accuracy of 80% on the cross-validation set using the leave-one-out cross-validation routine. The performance of the classification model was further evaluated using class-wise sensitivity, specificity, and precision metrics. This was the advantages of LDA to report quantitative parameters of classifying. For H2O2, the model achieved a sensitivity of 0.73, specificity of 0.90, and precision of 0.79. In the case of Cr(VI), sensitivity, specificity, and precision were 0.93, 0.83, and 0.74, respectively. For ClO−, the corresponding values were 0.73, 0.97, and 0.92. Also, classification matrix presented to provide a detailed view of LDA model's performance (Table 1). In this matrix, each row corresponded to a true class, and each column represented a predicted class. The value in each cell indicated how many samples actually belonged to the class specified by the row, and were predicted to belong to the class specified by the column. This structure helped to clearly visualize the class-by-class evaluation of prediction results. These results indicated feasible and acceptable classification performance across all classes.
 |
| | Fig. 8 LDA analysis for adulteration of milk with H2O2 (green), Cr(VI) (blue) and ClO− (red). Level 1: ●, Level 2: ▴, Level 2: ★, Level 4: ▪, Level 5: ♦. Details of concentration levels are provided in Fig. 7. | |
Table 1 Classification matrix of LDA results
| Predicted class |
Real class |
| H2O2 |
Cr(VI) |
ClO− |
| H2O2 |
11 |
3 |
1 |
| Cr(VI) |
1 |
14 |
0 |
| ClO− |
2 |
2 |
11 |
Loadings represented the mathematical link between the measured sensor responses and underlying discriminant components, showing how each sensor elements contributed to the formation of scores. Fig. 9, showed the two loading plots of the model of Fig. 8 based on the RGB responses of the sensor array. In this analysis, the first loading showed that the green channel of Au-NPs has highest positive loading, followed by blue channel of TMB/Au-Gel. In contrast, the blue channel of TMB/Au-Gel has the most negative loading. The second loading plot showed that the green channel of TMB/Au-Gel has the strongest negative influence, whereas the red channel of Au-NPs and blue channel of TMB/Au-Gel showed the most significant positive contributions.
 |
| | Fig. 9 Plot of the first (blue bar) and second (red bar) loadings. In the x-axis labels, the first letter (R/G/B) indicates the color channel, and the second (P/T/A) represent the sensor elements of Ag Prism, TMB/Au-Gel, and Au-NPs, respectively. | |
Fig. 10 showed LDA score plots for H2O2, Cr(VI), and ClO−, showing the first (LD1) and second (LD2) discriminant function. For all analytes, LD1 accounted for the vast majority of the variance (ranging from 84.6% to 96.3%), enabling a clear separation between the different concentration levels (L1–L5) and the unadulterated milk sample (L6). The clustering patterns indicated minimal overlap between groups. This indicated that the LDA model is capable of effectively discriminating between all levels of adulteration for each analyte, highlighting its potential for sensitive and reliable classification in milk quality analysis.
 |
| | Fig. 10 LDA analysis for different concentration levels (L1–L5 according to Fig. 7) of (a) H2O2, (b) ClO−, and (c) Cr(VI) from samples of unadulterated milk (L6). | |
For the present dataset, both HCA and LDA were able to reveal grouping patterns among the different concentration levels of H2O2, ClO−, and Cr(VI). However, their classification performance and clarity of separation differed noticeably. In the HCA dendrogram (Fig. 7), samples with similar concentration levels tended to group together, and the highest concentration levels (particularly L1 for H2O2) were clearly separated from lower levels. Nevertheless, some overlaps between intermediate concentrations were observed, indicating partial misclassification or less distinct separation. The clustering structure is hierarchical and unsupervised, meaning that it depends solely on the intrinsic similarity among samples without prior knowledge of class labels, which can limit its resolution in borderline cases. In contrast, LDA (Fig. 10) provided a much clearer separation of the five concentration levels for all three analytes. Since LDA was a supervised method, it optimized the separation between predefined groups, leading to highly discriminative LD1 and LD2 axes. For H2O2, more than 95% of the total variance was captured by LD1, resulting in excellent discrimination between all concentration levels, with particularly distinct isolation of the highest (L1) and lowest (L6) concentrations. Similar trends were observed for ClO− and Cr(VI), where LDA achieved compact clustering within each concentration level and large distances between groups, minimizing overlaps.
Overall, while HCA gave an initial qualitative overview of similarity patterns and can hint at natural groupings, LDA showed superior quantitative classification ability for this dataset. This was especially important when precise discrimination between closely related concentration levels was required, as in the present study.
3.6. Interference effect
The effect of interference on the efficiency of our developed sensor array for detecting the studied analytes has been evaluated. For this purpose, some adulterants such as formaldehyde, starch and salicylic acid were used. The color pattern obtained from the developed sensor array for each analyte with a concentration level of L3 (H2O2 (21.6 mmol L−1), ClO− (0.9 mmol L−1), Cr(VI) (0.34 mmol L−1)) in the presence of various aforementioned interferents with a concentration of 10 mmol L−1 were analyzed. The color change of the sensor array was demonstrated as EDs in Fig. 11. As can be seen, the presence of the mentioned interferences did not change the color pattern of the analytes.
 |
| | Fig. 11 Interference evaluation of proposed colorimetric sensor array for detection of H2O2 (21.6 mmol L−1), ClO− (0.9 mmol L−1), Cr(VI) (0.34 mmol L−1) in the presence of various adulterants with concentration of 10 mmol L−1 and N = 3. | |
4 Conclusion
This study presented a portable colorimetric sensor array based on nanostructured materials, integrated with smartphone-based imaging and chemometric analysis for the detection of milk adulterants. The sensor exhibited reproducible colorimetric responses to H2O2, ClO−, and Cr(VI) in diluted milk samples, with high repeatability (RSDs < 5%). The method achieved LOD of 0.62 mmol L−1 for H2O2, 0.02 mmol L−1 for ClO−, and 0.03 mmol L−1 for Cr(VI). The practical reliability of the system was confirmed through recovery tests in spiked milk samples, yielding accurate results ranging from 100–106% for H2O2, 99–112% for ClO−, and 103–115% for Cr(VI). The array showed distinct color responses to the adulterants of interest in milk—H2O2, Cr(VI), and ClO−—across different concentrations. The HCA findings confirmed the sensor array's capability in classifying milk adulterants, while also highlighting the need for further refinement in sensor design and data processing to reduce misclassification. Among the applied pattern recognition methods, LDA demonstrated superior performance with an overall classification accuracy of 80%, and maximum sensitivity, specificity, and precision values of 93%, 97%, and 92% respectively, effectively distinguishing adulterants across various concentration levels. Overall, this nanoparticle-based sensing approach offered a rapid, cost-effective, and practical solution for on-site milk quality control. Despite the promising performance of this nanoparticle-based sensor array, challenges remained in translating such systems into widely adopted, commercial tools. Future research should aim to simplify analytical workflows, reduce reliance on advanced chemometric tools and software, and explore low-tech, purely visual approaches to colorimetric sensing.
Author contributions
Sanaz Sajedi-Amin; acquisition of data, drafting the article, Ali Shayanfar; supervision, the conception and design of the study, Elaheh Rahimpour: supervision, analysis and interpretation of data, drafting the article or revising it critically for important intellectual content. All authors read and approved the final manuscript.
Conflicts of interest
The authors declare that they have no competing interests.
Data availability
Data supporting this study are included within the article
Acknowledgements
This work is based upon research funded by Iran National Science Foundation (INSF) under Project No. 4020386. The author(s) declare that Generative AI was used in the creation of this manuscript. During the preparation of this work the authors used Deepseek in order to improve the writing process and to enhance the readability and language of the manuscript. After using this tool/service, the authors reviewed and edited the content as needed and takes full responsibility for the content of the published article.
References
- I. Dohoo, I. McMillan and A. Meek, The effects of storage and method of fixation on somatic cell counts in bovine milk, Can. J. Comp. Med., 1981, 45, 335 CAS
. - T. Azad and S. Ahmed, Common milk adulteration and their detection techniques, Int. J. Food Contam., 2016, 3, 22 CrossRef
. - FDA, CFR-code of Federal Regulations Title 21, 2017 Search PubMed
. - N. Upadhyay, A. Goyal and A. Kumar, et al., Preservation of milk and milk products for analytical purposes, Food Rev. Int., 2014, 30, 203–224 CrossRef CAS
. - A. K. Yadav, M. Gattupalli, K. Dashora and V. Kumar, Key milk adulterants in India and their detection techniques: A review, Food Anal. Methods, 2023, 16, 499–514 CrossRef
. - U. Contreras, O. Barbosa-García and J. Pichardo-Molina, et al., Screening method for identification of adulterate and fake tequilas by using UV–VIS spectroscopy and chemometrics, Food Res. Int., 2010, 43, 2356–2362 CrossRef CAS
. - S. Sansuk, P. Juntarakod and W. Tongphoothorn, et al., Visual chemo-chronometric assay for quantifying ethanol in alcoholic drinks by the colorimetric Belousov-Zhabotinsky oscillator, Food Control, 2020, 110, 107042 CrossRef CAS
. - S. S. Souza, A. G. Cruz and E. H. Walter, et al., Monitoring the authenticity of Brazilian UHT milk: A chemometric approach, Food Chem., 2011, 124, 692–695 CrossRef CAS
. - H. Bharwani, S. Kapur and S. G. Palani, Rapid detection of hydrogen peroxide and nitrite in adulterated cow milk using enzymatic and nonenzymatic methods on a reusable platform, RSC Adv., 2025, 15, 1577–1589 RSC
. - W. Yi, P. Zhang and Y. Wang, et al., Copper ferrite nanoparticles loaded on reduced graphene oxide nanozymes for the ultrasensitive colorimetric assay of chromium ions, Anal. Methods, 2022, 14, 3434–3443 RSC
. - M. Thiruvengadam, J.-T. Kim and W.-R. Kim, et al., Safeguarding public health: Advanced detection of food adulteration using nanoparticle-based sensors, Crit. Rev. Anal. Chem., 2024, 55, 1702–1722 CrossRef PubMed
. - G. Alberti, C. Zanoni, L. R. Magnaghi and R. Biesuz, Gold and silver nanoparticle-based colorimetric sensors: New trends and applications, Chemosensors, 2021, 9, 305 CrossRef CAS
. - S. Sharmila and D. R. Shankaran, Plasmonic nanogels for naked-eye sensing of food adulterants, Anal. Methods, 2022, 14, 4703–4712 RSC
. - T. Lin, Y. Wu and Z. Li, et al., Visual monitoring of food spoilage based on hydrolysis-induced silver metallization of Au nanorods, Anal. Chem., 2016, 88, 11022–11027 CrossRef CAS PubMed
. - S. Mostafapour, F. M. Gharaghani and B. Hemmateenejad, Converting electronic nose into opto-electronic nose by mixing MoS2 quantum dots with organic reagents: Application to recognition of aldehydes and ketones and determination of formaldehyde in milk, Anal. Chim. Acta, 2021, 1170, 338654 CrossRef CAS PubMed
. - X. Hu, J. Shi and Y. Shi, et al., Use of a smartphone for visual detection of melamine in milk based on Au@ Carbon quantum dots nanocomposites, Food Chem., 2019, 272, 58–65 CrossRef CAS PubMed
. - C. A. T. Dos Santos, M. Lopo, R. N. Páscoa and J. A. Lopes, A review on the applications of portable near-infrared spectrometers in the agro-food industry, Appl. Spectrosc., 2013, 67, 1215–1233 CrossRef PubMed
. - L. Zhang, J. Hou and H. Zhou, et al., Identification of milk adulteration by a sensor array based on cationic polymer induced aggregation of a perylene probe, Food Chem., 2021, 343, 128492 CrossRef CAS PubMed
. - L. Yang, D. Huo and Y. Jiang, et al., Monitoring the adulteration of milk with melamine: a visualised sensor array approach, Food Addit. Contam.,:Part A, 2013, 30, 786–795 CrossRef CAS PubMed
. - R. A. Costa, C. L. Morais and T. R. Rosa, et al., Quantification of milk adulterants (starch, H2O2, and NaClO) using colorimetric assays coupled to smartphone image analysis, Microchem. J., 2020, 156, 104968 CrossRef CAS
. - A. Zarghampour, Z. Karimzadeh and M. Khoubnasabjafari, et al., A Silver Nanoprism-Based “Off-On” Sensor for Phenytoin Determination in Exhaled Breath Condensate, Plasmonics, 2024, 19, 2163–2170 CrossRef CAS
. - Z. Karimzadeh, A. Jouyban and M. Khoubnasabjafari, et al., Quantification of morphine in exhaled breath condensate using a double network polymeric hybrid hydrogel functionalized with AuNPs, BMC Chem., 2024, 18, 175 CrossRef CAS PubMed
. - X. Le Guével, B. Hötzer and G. Jung, et al., Formation of fluorescent metal (Au, Ag) nanoclusters capped in bovine serum albumin followed by fluorescence and spectroscopy, J. Phys. Chem. C, 2011, 115, 10955–10963 CrossRef
. - B. Hemmateenejad, M. M. Bordbar and Z. Shojaeifard, Data acquisition and data analysis in colorimetric sensor arrays, Chemom. Intell. Lab. Syst., 2023, 241, 104975 CrossRef CAS
. - D. González-Zárate, J. L. Zamora-Navarro and M. B. de la Mora, et al., Influence of Sodium Borohydride Content on Triangular Silver Nanoprisms Dropped on Copper Hydroxide Nanowire-Based SERS Substrates, ACS Omega, 2024, 9, 46997–47004 CrossRef PubMed
. - W. Haiss, N. T. Thanh, J. Aveyard and D. G. Fernig, Determination of size and concentration of gold nanoparticles from UV− Vis spectra, Anal. Chem., 2007, 79, 4215–4221 CrossRef CAS PubMed
. - L. Zhang and L. Li, Colorimetric detection of hydrogen peroxide using silver nanoparticles with three different morphologies, Anal. Methods, 2016, 8, 6691–6695 RSC
. - T. Parnklang, C. Lertvachirapaiboon and P. Pienpinijtham, et al., H 2 O 2-triggered shape transformation of silver nanospheres to nanoprisms with controllable longitudinal LSPR wavelengths, RSC Adv., 2013, 3, 12886–12894 RSC
. - K. Nitinaivinij, T. Parnklang and C. Thammacharoen, et al., Colorimetric determination of hydrogen peroxide by morphological decomposition of silver nanoprisms coupled with chromaticity analysis, Anal. Methods, 2014, 6, 9816–9824 RSC
. - Y. Xia, J. Ye and K. Tan, et al., Colorimetric visualization of glucose at the submicromole level in serum by a homogenous silver nanoprism–glucose oxidase system, Anal. Chem., 2013, 85, 6241–6247 CrossRef CAS PubMed
. - V. UshaVipinachandran and S. K. Bhunia, Spectroscopic/colorimetric dual-mode rapid and ultrasensitive detection of reactive oxygen species based on shape-dependent silver nanostructures, Anal. Methods, 2023, 15, 6687–6697 RSC
. - T. Sasikumar and M. Ilanchelian, Colorimetric detection of hypochlorite based on the morphological changes of silver nanoprisms to spherical nanoparticles, Anal. Methods, 2017, 9, 3151–3158 RSC
. - X. Chen, X. Tian and B. Su, et al., Au nanoparticles on citrate-functionalized graphene nanosheets with a high peroxidase-like performance, Dalton Trans., 2014, 43, 7449–7454 RSC
. - P. Das, P. Borthakur, P. K. Boruah and M. R. Das, Peroxidase mimic activity of Au–Ag/l-Cys-rGO nanozyme toward detection of Cr (VI) ion in water: role of 3, 3′, 5, 5′-tetramethylbenzidine adsorption, J. Chem. Eng. Data, 2019, 64, 4977–4990 CrossRef CAS
. - K. Shanmugaraj and M. Ilanchelian, Visual and optical detection of hypochlorite in water samples based on etching of gold/silver alloy nanoparticles, New J. Chem., 2017, 41, 14130–14136 RSC
. - Y. Liu and X. Wang, Colorimetric speciation of Cr (III) and Cr (VI) with a gold nanoparticle probe, Anal. Methods, 2013, 5, 1442–1448 RSC
. - Z. Li, J. R. Askim and K. S. Suslick, The optoelectronic nose: colorimetric and fluorometric sensor arrays, Chem. Rev., 2018, 119, 231–292 CrossRef PubMed
. - S. Brown, R. Tauler, and B. Walczak, Comprehensive Chemometrics: Chemical and Biochemical Data Analysis, Elsevier, 2020 Search PubMed
.
|
| This journal is © The Royal Society of Chemistry 2025 |
Click here to see how this site uses Cookies. View our privacy policy here.