private static function _get_hue_based_max_rgb( $red, $green, $blue ) {
		$max_rgb = max( $red, $green, $blue );
		$min_rgb = min( $red, $green, $blue );

		$diff_max_min_rgb = $max_rgb - $min_rgb;

		if ( $red === $max_rgb ) {
			$hue = 60 * ( $diff_max_min_rgb ? ( $green - $blue ) / $diff_max_min_rgb : 0 );
		} elseif ( $green === $max_rgb ) {
			$hue = 60 * ( $diff_max_min_rgb ? ( $blue - $red ) / $diff_max_min_rgb : 0 ) + 120;
		} elseif ( $blue === $max_rgb ) {
			$hue = 60 * ( $diff_max_min_rgb ? ( $red - $green ) / $diff_max_min_rgb : 0 ) + 240;
		}

		return $hue;
	}
private static function _get_hue_based_max_rgb( $red, $green, $blue ) {
		$max_rgb = max( $red, $green, $blue );
		$min_rgb = min( $red, $green, $blue );

		$diff_max_min_rgb = $max_rgb - $min_rgb;

		if ( $red === $max_rgb ) {
			$hue = 60 * ( $diff_max_min_rgb ? ( $green - $blue ) / $diff_max_min_rgb : 0 );
		} elseif ( $green === $max_rgb ) {
			$hue = 60 * ( $diff_max_min_rgb ? ( $blue - $red ) / $diff_max_min_rgb : 0 ) + 120;
		} elseif ( $blue === $max_rgb ) {
			$hue = 60 * ( $diff_max_min_rgb ? ( $red - $green ) / $diff_max_min_rgb : 0 ) + 240;
		}

		return $hue;
	}
private static function _get_hue_based_max_rgb ( $ red , $ green , $ blue ) { $ max_rgb = max ( $ red , $ green , $ blue ) ; $ min_rgb = min ( $ red , $ green , $ blue ) ; $ diff_max_min_rgb = $ max_rgb - $ min_rgb ; if ( $ red === $ max_rgb ) { $ hue = 60 * ( $ diff_max_min_rgb ? ( $ green - $ blue ) / $ diff_max_min_rgb : 0 ) ; } elseif ( $ green === $ max_rgb ) { $ hue = 60 * ( $ diff_max_min_rgb ? ( $ blue - $ red ) / $ diff_max_min_rgb : 0 ) + 120 ; } elseif ( $ blue === $ max_rgb ) { $ hue = 60 * ( $ diff_max_min_rgb ? ( $ red - $ green ) / $ diff_max_min_rgb : 0 ) + 240 ; } return $ hue ; }
Return hue from max rgb

@param dec $red
@param dec $green
@param dec $blue
@return hue
Return hue from max rgb