text: public HSSFColor findSimilarColor(int red, int green, int blue) {HSSFColor result = null;int minColorDistance = Integer.MAX_VALUE;byte[] b = _palette.getColor(PaletteRecord.FIRST_COLOR_INDEX);for (short i = PaletteRecord.FIRST_COLOR_INDEX; b != null;b = _palette.getColor(++i)){int colorDistance = Math.abs(red - unsignedInt(b[0])) +Math.abs(green - unsignedInt(b[1])) +Math.abs(blue - unsignedInt(b[2]));if (colorDistance < minColorDistance){minColorDistance = colorDistance;result = getColor(i);}}return result;}