Example usage for android.support.v4.graphics ColorUtils colorToLAB

List of usage examples for android.support.v4.graphics ColorUtils colorToLAB

Introduction

In this page you can find the example usage for android.support.v4.graphics ColorUtils colorToLAB.

Prototype

public static void colorToLAB(@ColorInt int color, @NonNull double[] outLab) 

Source Link

Document

Convert the ARGB color to its CIE Lab representative components.

Usage

From source file:arun.com.chromer.util.ColorUtil.java

private static double colorDifference(@ColorInt int a, @ColorInt int b) {
    double aLab[] = new double[3];
    double bLab[] = new double[3];
    ColorUtils.colorToLAB(a, aLab);
    ColorUtils.colorToLAB(b, bLab);// www  .  j a  va 2s. c  o  m
    return ColorUtils.distanceEuclidean(aLab, bLab);
}