Is a change in colorspace needed when comparing colors only evaluated by the computer? I am confused about the need to change color space for color comparison. I have read about delta E, the Lab format, and I do understand that comparisons in the RGB color space will not seem appropriate to the human eye. However, my program uses a linear color scale to calculate velocity, from a color flow Doppler signal. It takes the mean color of a sample region and compares it to the colors of the scale to find its nearest neighbor using Euclidian distance. I do that entirely in the BGR (OpenCV) color space, as the example image below:



Here, I obtain seemingly correct velocity values for each color circle, but is it only by chance, or is my assumption correct that since the color comparisons take place internally, it does not matter what color space I am in?
Delta E color difference formula is based on CIELAB color space and human perception. To convert from RGB to CIELAB space, you would need a base whitepoint (standard illuminant) which in this situation you do not have and need. 

Your assumption is correct. You do not specifically need to have a color difference similar to human perception. Additionally color distance metric should be based on your needs (you can use weighting depending on your needs).