public boolean matches ( float [ ] hsv , int [ ] fhsv ) { // check to see that this color is sufficiently "close" to the // root color based on the supplied distance parameters if ( distance ( fhsv [ 0 ] , _fhsv [ 0 ] , Short . MAX_VALUE ) > range [ 0 ] * Short . MAX_VALUE ) { return false ; } // saturation and value don't wrap around like hue if ( Math . abs ( _hsv [ 1 ] - hsv [ 1 ] ) > range [ 1 ] || Math . abs ( _hsv [ 2 ] - hsv [ 2 ] ) > range [ 2 ] ) { return false ; } return true ; }
Returns true if this colorization matches the supplied color false otherwise .