question: public static boolean isDark ( Color color ) { float r = color . getRed ( ) / 255.0f ; float g = color . getGreen ( ) / 255.0f ; float b = color . getBlue ( ) / 255.0f ; double whiteDistance = colorDistance ( r , g , b , 1.0 , 1.0 , 1.0 ) ; double blackDistance = colorDistance ( r , g , b , 0.0 , 0.0 , 0.0 ) ; boolean dark = blackDistance < whiteDistance ; if ( r + g + b == 1.0 ) dark = false ; return dark ; }
target:  Is the Color dark?