Colors { private static double[] rgb(int color) { int r = (color >> 16) & 0xFF; int g = (color >> 8) & 0xFF; int b = (color >> 0) & 0xFF; return new double[] { r / 255.0, g / 255.0, b / 255.0 }; }  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 testRgb() { assertEquals(2, Colors.roundRgbColor(0, 128, 0, 16)); }