An optoelectronic sensor was developed to measure the in-plane displacement between two parallel surfaces. This sensor used a photodetector, which was placed on one of the parallel surfaces, to measure the intensity of the red (R), green (G), blue (B), and white/clear (C) light spectra of a broad-spectrum light that was reflected off a color grid on the opposing surface. The in-plane displacement between these two surfaces caused a change in the reflected RGB and C light intensity, allowing the prediction of the displacement direction and magnitude by using a polynomial regression prediction algorithm to convert the RGB and C light intensity to in-plane displacement. Results from benchtop experiments showed that the sensor can achieve accurate displacement predictions with a coefficient of determination R2 > 0.97, a root mean squared error (RMSE) < 0.3 mm, and a mean absolute error (MAE) < 0.36 mm. By measuring the in-plane displacement between two surfaces, this sensor can be applied to measure the shear of a flexible layer, such as a shoe’s insole or the lining of a limb prosthesis. This sensor would allow slippage detection in wearable devices such as orthotics, prostheses, and footwear to quantify the overfitting or underfitting of these devices.