code: public static void printClickedColor( final BufferedImage image ) {
  		ImagePanel gui = new ImagePanel(image);
  		gui.addMouseListener(new MouseAdapter() {
  			@Override
  			public void mouseClicked(MouseEvent e) {
  				float[] color = new float[3];
  				int rgb = image.getRGB(e.getX(),e.getY());
  				ColorHsv.rgbToHsv((rgb >> 16) & 0xFF, (rgb >> 8) & 0xFF, rgb & 0xFF, color);
  				System.out.println("H = " + color[0]+" S = "+color[1]+" V = "+color[2]);
  
  				showSelectedColor("Selected",image,color[0],color[1]);
  			}
  		});
  
  		ShowImages.showWindow(gui,"Color Selector");
  	}
docs: Shows a color image and allows the user to select a pixel, convert it to HSV, print
  the HSV values, and calls the function below to display similar pixels.