Optical filters based on resonant gratings have spectral characteristics that are lithographically defined. Nanoimprint lithography is a relatively new method for producing large area gratings with sub-micron features. Computational modeling using rigorous coupled-wave analysis allows gratings to be designed to yield sharp reflectance maxima and minima. Combining these gratings with microfluidic channels and micromechanical actuators produced using micro electromechanical systems (MEMS) technology forms the basis for producing tunable filters and other wavelength selective elements. These devices achieve tunable optical characteristics by varying the index of refraction on the surface of the grating. Coating the grating surface with water creates a 33% change in the resonant wavelength whereas bringing a grating into contact with a quartz surface shifts the resonant wavelength from 558 nm to 879 nm, a fractional change of 58%. The reflectivity at a single wavelength can be varied by approximately a factor of three. Future applications of these devices may include tunable filters or optical modulators.