ColorConverter { @Nonnull public static String toColorCSS(@Nonnull final ColorRGB8 colorRGB8) { assert colorRGB8 != null; final String hex = "000000" + Integer.toHexString(colorRGB8.toIntegerRGB()); return '#' + hex.substring(hex.length() - 6); } private  ColorConverter(); @Nonnull static ColorRGB8 toColorRGB(@Nonnull final String colorCSS); @Nonnull static String toColorCSS(@Nonnull final ColorRGB8 colorRGB8); static final int COLOR_MIN_LENGTH; static final int COLOR_MAX_LENGTH; }
@Test public void testToColorCSS() { LOG.info("testToColorCSS"); final ColorRGB8 c1 = new ColorRGB8(1, 2, 3); Assert.assertEquals("#010203", ColorConverter.toColorCSS(c1)); }