Match depth image with color image

how do I minimize the error such that the color and displayed pixel match?

Is this a Kinect 1 or 2, or something else? Stereo calibration, see eg

https://answers.opencv.org/question/63846/resize-kinect-color-stream-to-match-depth/