Package org.color

Class ColorUtil

java.lang.Object
org.color.ColorUtil

public class ColorUtil
extends Object
Author:
klukas
  • Constructor Details

    • ColorUtil

      public ColorUtil()
  • Method Details

    • findBestColorIndex

      public static int findBestColorIndex​(ArrayList<Color> palette, Color c)
      Parameters:
      palette -
      c -
      Returns:
    • getMaxSaturationColor

      public static Color getMaxSaturationColor​(ArrayList<Color> colorsOfGroup)
    • getAverageColor

      public static int getAverageColor​(ArrayList<Color> colorsOfGroup)
    • getColorFromHex

      public static Color getColorFromHex​(String colorString)
    • getHexFromColor

      public static String getHexFromColor​(Color c)
    • colorRGB2XYZ

      public static ColorXYZ colorRGB2XYZ​(double R, double G, double B)
    • colorXYZ2CIELAB

      public static Color_CIE_Lab colorXYZ2CIELAB​(ColorXYZ XYZ)
    • deltaE2000simu

      public static double deltaE2000simu​(int rgb1, int rgb2)
    • deltaE2000

      public static double deltaE2000​(Color c1, Color c2)
    • similarColours

      public static boolean similarColours​(Color c1, Color c2, int allowedDistance)
    • similarColours

      public static boolean similarColours​(int r1, int g1, int b1, Color c2, int allowedDistance)
    • similarColours

      public static boolean similarColours​(int r1, int g1, int b1, int r2, int g2, int b2, int allowedDistance)