private int getHelperTextColor ( final float score ) { if ( ! helperTextColors . isEmpty ( ) ) { float interval = 1.0f / helperTextColors . size ( ) ; int index = ( int ) Math . floor ( score / interval ) - 1 ; index = Math . max ( index , 0 ) ; index = Math . min ( index , helperTextColors . size ( ) - 1 ) ; return helperTextColors . get ( index ) ; } return regularHelperTextColor ; }
Returns the color of the helper text which corresponds to a specific password strength .