I would use low-voltage, low-current resistance measurement. I am sure that if you use a multi-meter, the measured resistance will be different in opposite directions. Pick some safe voltage and current and do the measurement each way to determine the connections.
KE7GKP, sorry I'm not fully understand about your explanation.
How do you set up above condition?
Regarding the diode, the fan is fully equipped with rectifier diode on its VCC line. But not on its sensor line. Since the sensor was designed in state of open collector, hence if a diode is mounted in reverse bias, the sensor system will not work.
Again, Do we really can't find a high frequency response of a RGB color sensor?