Abstract: Novel sensor devices composed of a crystalline colloidal array (CCA) polymerized in a hydrogel are disclosed. The hydrogels are characterized as being capable of shrinking and swelling in response to specific stimuli applied thereto. As the hydrogels shrink or swell, the lattice structure of the CCA embedded therein changes, thereby changing the wavelength of light diffracted by the CCA. Thus by monitoring the change in diffracted wavelength, the concentration of a stimulus is determined. The gels can be modified to sense numerous different stimuli. The sensor devices are specific in that they are modified to react with only one species or family of species. These sensors have various applications in areas including, for example, environmental and chemical systems, chemomechanical systems, sensor devices and medical diagnostic tools. Various methods for making and using these devices are also disclosed.