Package org.color
Class ColorUtil
java.lang.Object
org.color.ColorUtil
public class ColorUtil extends Object
- Author:
- klukas
-
Constructor Summary
Constructors Constructor Description ColorUtil()
-
Method Summary
Modifier and Type Method Description static ColorXYZ
colorRGB2XYZ(double R, double G, double B)
static Color_CIE_Lab
colorXYZ2CIELAB(ColorXYZ XYZ)
static double
deltaE2000(Color c1, Color c2)
static double
deltaE2000simu(int rgb1, int rgb2)
static int
findBestColorIndex(ArrayList<Color> palette, Color c)
static int
getAverageColor(ArrayList<Color> colorsOfGroup)
static Color
getColorFromHex(String colorString)
static String
getHexFromColor(Color c)
static Color
getMaxSaturationColor(ArrayList<Color> colorsOfGroup)
static boolean
similarColours(int r1, int g1, int b1, int r2, int g2, int b2, int allowedDistance)
static boolean
similarColours(int r1, int g1, int b1, Color c2, int allowedDistance)
static boolean
similarColours(Color c1, Color c2, int allowedDistance)
-
Constructor Details
-
ColorUtil
public ColorUtil()
-
-
Method Details
-
findBestColorIndex
- Parameters:
palette
-c
-- Returns:
-
getMaxSaturationColor
-
getAverageColor
-
getColorFromHex
-
getHexFromColor
-
colorRGB2XYZ
-
colorXYZ2CIELAB
-
deltaE2000simu
public static double deltaE2000simu(int rgb1, int rgb2) -
deltaE2000
-
similarColours
-
similarColours
-
similarColours
public static boolean similarColours(int r1, int g1, int b1, int r2, int g2, int b2, int allowedDistance)
-