Colors { public static int roundColor(int col, int max) { return roundColor(col, max, null); }  static void setRgbColors(int[] colors); static int rgbColor(int col); static Integer rgbColor(String name); static int roundColor(int col, int max); static int roundColor(int col, int max, String dist); static int roundRgbColor(int r, int g, int b, int max); static double[] CAT02toHPE(double[] RGB); static double[] rgb2cielab(double[] rgb); static final int[] DEFAULT_COLORS_256; static final double[] D50; static final double[] D65; static final double[] averageSurrounding; static final double[] dimSurrounding; static final double[] darkSurrounding; static final double[] sRGB_encoding_environment; static final double[] sRGB_typical_environment; static final double[] AdobeRGB_environment; static final int J; static final int Q; static final int C; static final int M; static final int s; static final int H; static final int h; }
@Test public void testRounding() { assertEquals(2, Colors.roundColor(71, 16, "cam02")); assertEquals(2, Colors.roundColor(71, 16, "camlab(1,2)")); assertEquals(8, Colors.roundColor(71, 16, "rgb")); assertEquals(8, Colors.roundColor(71, 16, "rgb(2,4,3)")); assertEquals(2, Colors.roundColor(71, 16, "cie76")); assertEquals(2, Colors.roundColor(71, 16, "cie94")); assertEquals(2, Colors.roundColor(71, 16, "cie00")); }