public static double perceivedBrightness(Color color) {
		double red = color.getRed() / 255.0;
		if (!isMonochrome(color)) {
			double green = color.getGreen() / 255.0;
			double blue = color.getBlue() / 255.0;
			return Math.sqrt(red * red * 0.241 + green * green * 0.691 + blue * blue * 0.068);
		}
		return red;
	}