compat/src/main/java/androidx/core/graphics/ColorUtils.java
public static void blendHSL(@NonNull float[] hsl1, @NonNull float[] hsl2,
            @FloatRange(from = 0.0, to = 1.0) float ratio, @NonNull float[] outResult) {
        if (outResult.length != 3) {
            throw new IllegalArgumentException("result must have a length of 3.");
        }
        final float inverseRatio = 1 - ratio;
        // Since hue is circular we will need to interpolate carefully
        outResult[0] = circularInterpolate(hsl1[0], hsl2[0], ratio);
        outResult[1] = hsl1[1] * inverseRatio + hsl2[1] * ratio;
        outResult[2] = hsl1[2] * inverseRatio + hsl2[2] * ratio;
    }
/**
     * Blend between {@code hsl1} and {@code hsl2} using the given ratio. This will interpolate
     * the hue using the shortest angle.
     *
     * <p>A blend ratio of 0.0 will result in {@code hsl1}, 0.5 will give an even blend,
     * 1.0 will result in {@code hsl2}.</p>
     *
     * @param hsl1      3-element array which holds the first HSL color
     * @param hsl2      3-element array which holds the second HSL color
     * @param ratio     the blend ratio of {@code hsl1} to {@code hsl2}
     * @param outResult 3-element array which holds the resulting HSL components
     */
Blend between  hsl1 and  hsl2 using the given ratio. This will interpolate
the hue using the shortest angle.

A blend ratio of 0.0 will result in  hsl1, 0.5 will give an even blend,
1.0 will result in  hsl2.

@param hsl1      3-element array which holds the first HSL color
@param hsl2      3-element array which holds the second HSL color
@param ratio     the blend ratio of  hsl1 to  hsl2
@param outResult 3-element array which holds the resulting HSL components
Blend between hsl1 and hsl2 using the given ratio . This will interpolate the hue using the shortest angle . A blend ratio of 0 . 0 will result in hsl1 0 . 5 will give an even blend 1 . 0 will result in hsl2 . @param hsl1 3 - element array which holds the first HSL color @param hsl2 3 - element array which holds the second HSL color @param ratio the blend ratio of hsl1 to hsl2 @param outResult 3 - element array which holds the resulting HSL components
public static void blendHSL(@NonNull float[] hsl1, @NonNull float[] hsl2,
            @FloatRange(from = 0.0, to = 1.0) float ratio, @NonNull float[] outResult) {
        if (outResult.length != 3) {
            throw new IllegalArgumentException("result must have a length of 3.");
        }
        final float inverseRatio = 1 - ratio;
        outResult[0] = circularInterpolate(hsl1[0], hsl2[0], ratio);
        outResult[1] = hsl1[1] * inverseRatio + hsl2[1] * ratio;
        outResult[2] = hsl1[2] * inverseRatio + hsl2[2] * ratio;
    }
public static void blendHSL ( @ NonNull float [ ] hsl1 , @ NonNull float [ ] hsl2 , @ FloatRange ( from = 0.0 , to = 1.0 ) float ratio , @ NonNull float [ ] outResult ) { if ( outResult . length != 3 ) { throw new IllegalArgumentException ( "result must have a length of 3." ) ; } final float inverseRatio = 1 - ratio ; outResult [ 0 ] = circularInterpolate ( hsl1 [ 0 ] , hsl2 [ 0 ] , ratio ) ; outResult [ 1 ] = hsl1 [ 1 ] * inverseRatio + hsl2 [ 1 ] * ratio ; outResult [ 2 ] = hsl1 [ 2 ] * inverseRatio + hsl2 [ 2 ] * ratio ; }
Blend between {@code hsl1} and {@code hsl2} using the given ratio.
Blend between { @code hsl1 } and { @code hsl2 } using the given ratio .
// Since hue is circular we will need to interpolate carefully