How can I convert a color in RGB format into a color name?
Examples:
For each known color compute:
rgbDistance = Math.abs(myColor.getRed() - colorI.getRed() +
Math.abs(myColor.getGreen() - colorI.getGreen()) +
Math.abs(myColor.getBlue() - colorI.getBlue())
Return the name of colorI
for which rgbDistance
was smallest.