compat/src/main/java/androidx/core/graphics/ColorUtils.java
public static void blendLAB(@NonNull double[] lab1, @NonNull double[] lab2,
            @FloatRange(from = 0.0, to = 1.0) double ratio, @NonNull double[] outResult) {
        if (outResult.length != 3) {
            throw new IllegalArgumentException("outResult must have a length of 3.");
        }
        final double inverseRatio = 1 - ratio;
        outResult[0] = lab1[0] * inverseRatio + lab2[0] * ratio;
        outResult[1] = lab1[1] * inverseRatio + lab2[1] * ratio;
        outResult[2] = lab1[2] * inverseRatio + lab2[2] * ratio;
    }
/**
     * Blend between two CIE-LAB colors using the given ratio.
     *
     * <p>A blend ratio of 0.0 will result in {@code lab1}, 0.5 will give an even blend,
     * 1.0 will result in {@code lab2}.</p>
     *
     * @param lab1      3-element array which holds the first LAB color
     * @param lab2      3-element array which holds the second LAB color
     * @param ratio     the blend ratio of {@code lab1} to {@code lab2}
     * @param outResult 3-element array which holds the resulting LAB components
     */
Blend between two CIE-LAB colors using the given ratio.
A blend ratio of 0.0 will result in  lab1, 0.5 will give an even blend,
1.0 will result in  lab2.

@param lab1      3-element array which holds the first LAB color
@param lab2      3-element array which holds the second LAB color
@param ratio     the blend ratio of  lab1 to  lab2
@param outResult 3-element array which holds the resulting LAB components
Blend between two CIE - LAB colors using the given ratio . A blend ratio of 0 . 0 will result in lab1 0 . 5 will give an even blend 1 . 0 will result in lab2 . @param lab1 3 - element array which holds the first LAB color @param lab2 3 - element array which holds the second LAB color @param ratio the blend ratio of lab1 to lab2 @param outResult 3 - element array which holds the resulting LAB components
public static void blendLAB(@NonNull double[] lab1, @NonNull double[] lab2,
            @FloatRange(from = 0.0, to = 1.0) double ratio, @NonNull double[] outResult) {
        if (outResult.length != 3) {
            throw new IllegalArgumentException("outResult must have a length of 3.");
        }
        final double inverseRatio = 1 - ratio;
        outResult[0] = lab1[0] * inverseRatio + lab2[0] * ratio;
        outResult[1] = lab1[1] * inverseRatio + lab2[1] * ratio;
        outResult[2] = lab1[2] * inverseRatio + lab2[2] * ratio;
    }
public static void blendLAB ( @ NonNull double [ ] lab1 , @ NonNull double [ ] lab2 , @ FloatRange ( from = 0.0 , to = 1.0 ) double ratio , @ NonNull double [ ] outResult ) { if ( outResult . length != 3 ) { throw new IllegalArgumentException ( "outResult must have a length of 3." ) ; } final double inverseRatio = 1 - ratio ; outResult [ 0 ] = lab1 [ 0 ] * inverseRatio + lab2 [ 0 ] * ratio ; outResult [ 1 ] = lab1 [ 1 ] * inverseRatio + lab2 [ 1 ] * ratio ; outResult [ 2 ] = lab1 [ 2 ] * inverseRatio + lab2 [ 2 ] * ratio ; }
Blend between two CIE-LAB colors using the given ratio.
Blend between two CIE - LAB colors using the given ratio .