### Question:
Colors { @Nonnull public static Color decodeFromHexRGB(@Nonnull String rgbHex) throws NumberFormatException { requireNonNull(rgbHex, "rgbHex"); return Color.decode(rgbHex); } private  Colors(); @Nonnull static String encodeToHexRGB(@Nonnull Color color); @Nonnull static Color decodeFromHexRGB(@Nonnull String rgbHex);  }### Answer:
@Test public void testDecodeFromHexRGB() { Color color; color = Colors.decodeFromHexRGB("#000000"); assertEquals(0, color.getRed()); assertEquals(0, color.getGreen()); assertEquals(0, color.getBlue()); color = Colors.decodeFromHexRGB("#FFFFFF"); assertEquals(255, color.getRed()); assertEquals(255, color.getGreen()); assertEquals(255, color.getBlue()); color = Colors.decodeFromHexRGB("#010000"); assertEquals(1, color.getRed()); assertEquals(0, color.getGreen()); assertEquals(0, color.getBlue()); color = Colors.decodeFromHexRGB("#000100"); assertEquals(0, color.getRed()); assertEquals(1, color.getGreen()); assertEquals(0, color.getBlue()); color = Colors.decodeFromHexRGB("#000001"); assertEquals(0, color.getRed()); assertEquals(0, color.getGreen()); assertEquals(1, color.getBlue()); }