Experimental analysis of the relationship between pH and the color of red cabbage extract under RGB LED illumination using machine learning

Authors

DOI:

https://doi.org/10.37779/nt.v27i2.5632

Keywords:

Chemistry; indicators; pH; machine learning; digital colorimetry

Abstract

Machine learning resources have become consolidated as relevant tools for analyzing multidimensional datasets, particularly in qualitative and quantitative studies of substances under different experimental conditions. In this work, we investigate the relationship between pH and the color of red cabbage extract using an accessible experimental setup composed of a plastic structure that aligns an RGB LED, a standard glass cuvette, and a smartphone camera. Each primary color of the LED was used separately to produce specific transmittance conditions, allowing the colorimetric variations of the extract to be recorded across pH levels ranging from 2.0 to 9.0. Based on independent repetitions for each combination of pH and illumination color, a dataset with more than one hundred samples and five features was obtained and analyzed using machine learning methods in both unsupervised (clustering) and supervised (regression) domains. The results indicated that samples illuminated by the green LED exhibited greater separation in HSV space, enabling the development of a more consistent predictive model for estimating pH from the color parameters. These findings reinforce the utility of low-cost experimental approaches combined with modern computational analysis for the quantitative investigation of natural indicators and for the construction of machine-learning-based predictive models.

Author Biographies

Milton Baptista Filho, Instituto Federal Fluminense - IFFluminense (Campus Campos-Centro)

Professor de física no Núcleo de Pesquisa em Física e Ensino de Ciências (NPFEC) do MNPEF/IFFluminense. 

Bruna Lemos Marques Figueiredo, Instituto Federal Fluminense - IFFluminense (Campus Campos-Centro)

Licencianda em Ciências da Natureza no IF Fluminense, campus Campos Centro.

Cassiana Barreto Hygino Machado, Instituto Federal Fluminense - IFFluminense (Campus Campos-Centro)

Professora de física no Núcleo de Pesquisa em Física e Ensino de Ciências (NPFEC) do MNPEF/IFFluminense. 

Vantelfo Nunes Garcia, Instituto Federal Fluminense - IFFluminense (Campus Campos-Centro)

Professor de física no Núcleo de Pesquisa em Física e Ensino de Ciências (NPFEC) do MNPEF/IFFluminense.

Messias Freire Cardoso Baptista, Cosmetica Labs Inc.

Cosmetica Labs Inc., Toronto, Canada

Tiago Desteffani Admiral , Instituto Federal Fluminense - IFFluminense (Campus Campos-Centro)

Professor de física no Núcleo de Pesquisa em Física e Ensino de Ciências (NPFEC) do MNPEF/IFFluminense. 

Published

2026-04-28

How to Cite

Filho, M. B., Figueiredo, B. L. M., Machado, C. B. H., Garcia, V. N., Baptista, M. F. C., & Admiral , T. D. (2026). Experimental analysis of the relationship between pH and the color of red cabbage extract under RGB LED illumination using machine learning. Disciplinarum Scientia | Naturais E Tecnológicas, 27(2), 27–44. https://doi.org/10.37779/nt.v27i2.5632

Issue

Section

Artigos