question: public GradientFormatter ( float maxScore , String minForegroundColor , String maxForegroundColor , String minBackgroundColor , String maxBackgroundColor ) { highlightForeground = ( minForegroundColor != null ) && ( maxForegroundColor != null ) ; if ( highlightForeground ) { if ( minForegroundColor . length ( ) != 7 ) { throw new IllegalArgumentException ( "minForegroundColor is not 7 bytes long eg a hex " + "RGB value such as #FFFFFF" ) ; } if ( maxForegroundColor . length ( ) != 7 ) { throw new IllegalArgumentException ( "minForegroundColor is not 7 bytes long eg a hex " + "RGB value such as #FFFFFF" ) ; } fgRMin = hexToInt ( minForegroundColor . substring ( 1 , 3 ) ) ; fgGMin = hexToInt ( minForegroundColor . substring ( 3 , 5 ) ) ; fgBMin = hexToInt ( minForegroundColor . substring ( 5 , 7 ) ) ; fgRMax = hexToInt ( maxForegroundColor . substring ( 1 , 3 ) ) ; fgGMax = hexToInt ( maxForegroundColor . substring ( 3 , 5 ) ) ; fgBMax = hexToInt ( maxForegroundColor . substring ( 5 , 7 ) ) ; } highlightBackground = ( minBackgroundColor != null ) && ( maxBackgroundColor != null ) ; if ( highlightBackground ) { if ( minBackgroundColor . length ( ) != 7 ) { throw new IllegalArgumentException ( "minBackgroundColor is not 7 bytes long eg a hex " + "RGB value such as #FFFFFF" ) ; } if ( maxBackgroundColor . length ( ) != 7 ) { throw new IllegalArgumentException ( "minBackgroundColor is not 7 bytes long eg a hex " + "RGB value such as #FFFFFF" ) ; } bgRMin = hexToInt ( minBackgroundColor . substring ( 1 , 3 ) ) ; bgGMin = hexToInt ( minBackgroundColor . substring ( 3 , 5 ) ) ; bgBMin = hexToInt ( minBackgroundColor . substring ( 5 , 7 ) ) ; bgRMax = hexToInt ( maxBackgroundColor . substring ( 1 , 3 ) ) ; bgGMax = hexToInt ( maxBackgroundColor . substring ( 3 , 5 ) ) ; bgBMax = hexToInt ( maxBackgroundColor . substring ( 5 , 7 ) ) ; } this . maxScore = maxScore ; }
target:  Sets the color range for the IDF scores