Color (Point location) { if (SystemInfo.isMac) { BufferedImage image = MacColorPipette.captureScreen(myPickerFrame, new Rectangle(location.x, location.y, 1, 1)); if (image != null) { //noinspection UseJBColor return new Color(image.getRGB(0, 0)); } } return myRobot.getPixelColor(location.x, location.y); }