static HSL toHSL( double color ) {
        long argb = Double.doubleToRawLongBits( color );
        double a = alpha( color );
        double r = clamp( ((argb >> 32) & 0xFFFF) / (double)0xFF00 );
        double g = clamp( ((argb >> 16) & 0xFFFF) / (double)0xFF00 );
        double b = clamp( ((argb >> 0) & 0xFFFF) / (double)0xFF00 );

        double max = Math.max( Math.max( r, g ), b );
        double min = Math.min( Math.min( r, g ), b );
        double h, s, l = (max + min) / 2, d = max - min;

        if( max == min ) {
            h = s = 0;
        } else {
            s = l > 0.5 ? d / (2 - max - min) : d / (max + min);

            if( max == r ) {
                h = (g - b) / d + (g < b ? 6 : 0);
            } else if( max == g ) {
                h = (b - r) / d + 2;
            } else {
                h = (r - g) / d + 4;
            }
            h /= 6;
        }
        return new HSL( h * 360, s, l, a );
    }
static HSL toHSL ( double color ) { long argb = Double . doubleToRawLongBits ( color ) ; double a = alpha ( color ) ; double r = clamp ( ( ( argb > > 32 ) & 0xFFFF ) / ( double ) 0xFF00 ) ; double g = clamp ( ( ( argb > > 16 ) & 0xFFFF ) / ( double ) 0xFF00 ) ; double b = clamp ( ( ( argb > > 0 ) & 0xFFFF ) / ( double ) 0xFF00 ) ; double max = Math . max ( Math . max ( r , g ) , b ) ; double min = Math . min ( Math . min ( r , g ) , b ) ; double h , s , l = ( max + min ) / 2 , d = max - min ; if ( max == min ) { h = s = 0 ; } else { s = l > 0.5 ? d / ( 2 - max - min ) : d / ( max + min ) ; if ( max == r ) { h = ( g - b ) / d + ( g < b ? 6 : 0 ) ; } else if ( max == g ) { h = ( b - r ) / d + 2 ; } else { h = ( r - g ) / d + 4 ; } h /= 6 ; } return new HSL ( h * 360 , s , l , a ) ; }
Create a HSL color.
@param color argb color
@return the HSL