private static int [ ] hslToRgb ( float h , float s , float l ) { int [ ] ret = new int [ 3 ] ; float m2 = ( l <= 0.5f ) ? l * ( s + 1 ) : l + s - l * s ; float m1 = l * 2 - m2 ; ret [ 0 ] = Math . round ( hueToRgb ( m1 , m2 , h + 1.0f / 3.0f ) * MAX_VALUE ) ; ret [ 1 ] = Math . round ( hueToRgb ( m1 , m2 , h ) * MAX_VALUE ) ; ret [ 2 ] = Math . round ( hueToRgb ( m1 , m2 , h - 1.0f / 3.0f ) * MAX_VALUE ) ; return ret ; }
Converts the HSL color model to RGB