On-chip complex refractive index detection at multiple wavelengths for selective sensing