Abstract
We present the application of QR Codes as carriers for colorimetric dyes, whereby this refined version of machine-readable patterns applied to colorimetric sensing also allows us to maintain the data from the QR Code standard in a back-compatible way, which means that the QR Code is still able to encode digital data (readable with a standard QR Code decoder) alongside a hundred colorimetric references and the dyes. Also, we discuss in detail the effectiveness of different color correction methods in attaining color accuracy levels suited for sensing via colorimetry. Moreover, we illustrate how color correction techniques can be applied to take advantage of having hundreds of color references, with an exemplary case of a CO2 printed sensor used to monitor the integrity of modified atmosphere packaging (MAP).
1. Introduction
In this work, we present a consistent novel approach to embed colorimetric dyes into QR Codes; this embedding process is the culmination of several partial proposals that we, and others, have previously developed [,,]. In 2018, we presented a machine-readable pattern to allocate an ammonia sensor; this machine-readable pattern presents two spaces to print a colorimetric sensor and contains no data, only color references (see Figure 1a) []. Later, in 2021, we presented a more robust and compact version of this machine-readable pattern that optimizes the number of color references (up to a hundred references) but still does not contain any digital data (see Figure 1b) []. In 2023, P. Escobedo et al. presented the QRSens machine-readable pattern (see Figure 1c) which presents colorimetric dyes alongside digital data blocks but does not optimize the placement of the dyes or the colorimetric references (it only contains two: black and white) []. Here, we introduce the usage of back-compatible color QR Codes (BCQR) applied to accommodate colorimetric dyes and color references spread across the data and error correction blocks in a back-compatible fashion (see Figure 1d). This provides a fully integrated procedure compared to the QR Code standard [].

Figure 1.
Evolution over the years of machine-readable patterns which embed colorimetric dyes from 2018 to 2023. (a) Our first proposal for such patterns, presented at Eurosensors in 2018 []; (b) our second attempt to fabricate the patterns []; (c) Escobedo et al. proposal [] to embed sensors in pattern with digital data; and (d) our proposal to do a similar concept but maximazing back-compatibility [].
2. Materials and Methods
The BCQR Codes have been created according to the following steps: (i) the QR Code embeds 128 color references which represent an excursion in the RGB space, which represents as the color references, and each reference color measures exactly the same size as a black and white block; (ii) the reference colors are spread across the error correction and data zones of the QR Code in a back-compatible manner []; (iii) a CO2 sensor for MAP [] is screen-printed into the QR Code which occupies a 6-block space above the bottom-left finder pattern of the QR Code. The sensor is exposed to different CO2 concentrations—20%, 30%, 35%, 40% and 50%—and captured in different illumination conditions from 2500 K to 6500 K in steps of 500 K of an LED light. Gasometric responses from the measured colors are derived following an exponential law [].
3. Discussion
The results indicate that using hundreds of color references for color correcting of the measured samples (AFF1–AFF3), instead of using the two-color white balance (AFF0), is a key factor for viable machine-readable colorimetric sensors (see Table 1).

Table 1.
Comparison of the sensitivity of the sensor for different color corrections.
Author Contributions
Conceptualization, I.B.-A. and J.D.P.; methodology, M.M.; software, I.B.-A.; validation, I.B.-A., M.M. and F.C.; formal analysis, I.B.-A.; investigation, F.C.; resources, M.M.; writing—original draft preparation, I.B.-A.; review, J.D.P.; visualization, M.M.; supervision, J.D.P.; project administration, J.D.P.; funding acquisition, J.D.P. All authors have read and agreed to the published version of the manuscript.
Funding
This research was funded by the ERC under the FP7 and the H2020 programs, with grants no. 727297 and no. 957527.
Institutional Review Board Statement
Not applicable.
Informed Consent Statement
Not applicable.
Data Availability Statement
The dataset regarding the original work of the proposal of Back-compatible QR Codes is publicly available [].
Acknowledgments
J.D. Prades acknowledges the support of the ICREA Academia Program.
Conflicts of Interest
The authors declare no conflicts of interest. ColorSensing SL declares no conflicts of interest.
References
- Benito-Altamirano, I.; Pfeiffer, P.; Cusola, O.; Daniel Prades, J. Machine-Readable Pattern for Colorimetric Sensor Interrogation. Proceedings 2018, 2, 906. [Google Scholar]
- Engel, L.; Benito-Altamirano, I.; Tarantik, K.R.; Pannek, C.; Dold, M.; Prades, J.D.; Wöllenstein, J. Printed Sensor Labels for Colorimetric Detection of Ammonia, Formaldehyde and Hydrogen Sulfide from the Ambient Air. Sens. Actuators B Chem. 2021, 330, 129281. [Google Scholar] [CrossRef]
- Escobedo, P.; Ramos-Lorente, C.E.; Ejaz, A.; Erenas, M.M.; Martínez-Olmos, A.; Carvajal, M.A.; García-Núñez, C.; De Orbe-Payá, I.; Capitán-Vallvey, L.F.; Palma, A.J. QRsens: Dual-Purpose Quick Response Code with Built-in Colorimetric Sensors. Sens. Actuators B Chem. 2023, 376, 133001. [Google Scholar] [CrossRef]
- Benito-Altamirano, I.; Martínez-Carpena, D.; Casals, O.; Fábrega, C.; Waag, A.; Prades, J.D. Back-Compatible Color QR Codes for Colorimetric Applications. Pattern Recognit. 2023, 133, 108981. [Google Scholar] [CrossRef]
- Zhang, Y.; Lim, L.-T. Inkjet-Printed CO2 Colorimetric Indicators. Talanta 2016, 161, 105–113. [Google Scholar] [CrossRef] [PubMed]
- Benito-Altamirano, I.; Martínez-Carpena, D.; Casals, O.; Fàbrega, C.; Waag, A.; Prades, J.D. A dataset of color QR codes generated using back-compatible and random colorization algorithms exposed to different illumination-capture channel conditions. Data Brief 2023, 46, 108780. [Google Scholar] [CrossRef] [PubMed]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).