Currently working on one academic project regarding color detection in android. I am trying to detect color using android cameras that would during live preview or after the
k-nearest neighbors (k=1 in your case) with euclidean distance might work in your case, because you only have 3 dimensions (this method suffer from the curse of dimensionality )
You can also expirement with different distance measures such as Hamming distance