public static boolean isGray(int c) {
		int r = (c >> 16) & 0xFF;
	    int g = (c >> 8) & 0xFF;
	    int b = c & 0xFF;
	    
	    if(r < 50 || g < 50 || b < 50)
	    	return false;
	    
	    if(r > 240 || g > 240 || b > 240)
	    	return false;
	    
	    int diffR = Math.max(Math.abs(r -g), Math.abs(r- b));
	    int diffG = Math.abs(g - b);

	    
	    if(diffR < 40 && diffG < 40)
	    	return true;
	    
	    return false;
	}