Patterning Refractive Index on the Surface of a Chip by Direct Nanoimprinting