Sustainable and green sensors based on polydimethyl siloxane (PDMS) or cellulose polymers, as a case of study of the use of portable instrumentation joined to a smartphone, have been tested. A smartphone camera was used to obtain images and was also coupled to a minispectrometer, without and with an optical fiber probe to register spectra. To study light influence on the analytical signal, light-emitting diode (LED), halogen light and daylight have been assayed. A corrective palette of 24 colors and a set with 45 colors from different color ranges were used as the validation set. The results indicated that halogen light was the best option to obtain the spectra. However, for digital image analysis, it was the LED light that gave a greater approximation of the RGB values of the real colors. Based on these results, the spectra and the RGB components of PDMS solid sensors doped with 1,2-naphtoquinone-4-sulfonate (NQS) for the determination of ammonium in water or urea in urine, PDMS doped with Griess reagent for developing the assay of nitrite in waters and cellulose sensors for the determination of hydrogen sulfide in the atmospheres have been obtained. The results achieved were good in terms of sensitivity and linearity and were comparable to those obtained using a laboratory benchtop instrument. Several rules for selecting the most suitable light source to obtain the spectra and/or images have been established and an image correction method has been introduced.