<br><br>Optical sensors hold the promise of providing the coupling between the tangible and the digital world that we are currently experiencing with physical sensors. The core of optical sensor development lies in materials development, where specific requirements of opposing physicochemical properties create a significant obstacle. The sensor material must provide dye retention, while ensuring porosity for analyte transport. The sensor material must provide hydrophobic pockets for dyes to ensure high signal intensity, while remaining fully hydrophobic to measure in water. We have previously reported optical sensors, where we compromised on sensor manufacturing by using a double-layer composite. Here, we report a composite organically modified sol-gel (ORMOSIL) polymer, where polystyrene (PS) nanoparticles (NPs) have been incorporated. This allows all the opposing requirements on optical sensor materials to be fulfilled, and by introducing a hydrophobic reference dye in the fully hydrophobic compartments of the sensor material we show that we can incorporate any hydrophobic fluorophore in this material, even those which are suffering from quenching in water. In this work, PS NPs with 1,13-dimethoxyquinacridinium (DMQA) were immobilized in a composite sol-gel material with pH responsive diazaoxatriangulenium (DAOTA) dyes prior to curing. The multicomponent sensor composite was cured on a polycarbonate hemiwicking substrate, and the resulting fluorescence intensity ratiometric optical pH sensor was shown to have excellent performance. We expect that this type of composite sensor materials will allow the creation of next generation industrial chemosensors.<br><br>