@Override
				public void mouseClicked( MouseEvent e ) {
					dispose();

					Color color = null;
					if( SwingUtilities.isLeftMouseButton( e ) ) {
						// on macOS, robot not always returns correct color
						// in mouse clicked event (sometimes black; sometimes
						// includes opacity of disposed window)
						// --> use last hover color on macOS
						color = SystemInfo.isMacOS
							? lastHoverColor
							: robot.getPixelColor( e.getX() + getX(), e.getY() + getY() );
					}
					pick( color );
				}
An invisible window used to receive mouse and keyboard events for the whole screen.
flatlaf-theme-editor/src/main/java/com/formdev/flatlaf/themeeditor/FlatColorPipette.java