### Question:
CSSColorHelper { @Nullable public static CSSRGB getParsedRGBColorValue (@Nullable final String sValue) { final String sRealValue = StringHelper.trim (sValue); if (StringHelper.hasText (sRealValue) && sRealValue.startsWith (CCSSValue.PREFIX_RGB)) { final String [] aValues = RegExHelper.getAllMatchingGroupValues (PATTERN_RGB, sRealValue); if (aValues != null) return new CSSRGB (aValues[0], aValues[1], aValues[2]); } return null; } private  CSSColorHelper(); static boolean isColorValue(@Nullable final String sValue); static boolean isRGBColorValue(@Nullable final String sValue); @Nullable static CSSRGB getParsedRGBColorValue(@Nullable final String sValue); static boolean isRGBAColorValue(@Nullable final String sValue); @Nullable static CSSRGBA getParsedRGBAColorValue(@Nullable final String sValue); static boolean isHSLColorValue(@Nullable final String sValue); @Nullable static CSSHSL getParsedHSLColorValue(@Nullable final String sValue); static boolean isHSLAColorValue(@Nullable final String sValue); @Nullable static CSSHSLA getParsedHSLAColorValue(@Nullable final String sValue); static boolean isHexColorValue(@Nullable final String sValue); @Nonnegative static int getRGBValue(final int nRGBPart); @Nonnegative static float getOpacityToUse(final float fOpacity); @Nonnull @Nonempty static String getRGBColorValue(final int nRed, final int nGreen, final int nBlue); @Nonnull @Nonempty static String getRGBAColorValue(final int nRed, final int nGreen, final int nBlue, final float fOpacity); @Nonnegative static int getHSLHueValue(final int nHSLPart); @Nonnegative static float getHSLHueValue(final float fHSLPart); @Nonnegative static int getHSLPercentageValue(final int nHSLPart); @Nonnegative static float getHSLPercentageValue(final float nHSLPart); @Nonnull @Nonempty static String getHSLColorValue(final int nHue, final int nSaturation, final int nLightness); @Nonnull @Nonempty static String getHSLColorValue(final float fHue, final float fSaturation, final float fLightness); @Nonnull @Nonempty static String getHSLAColorValue(final int nHue, final int nSaturation, final int nLightness, final float fOpacity); @Nonnull @Nonempty static String getHSLAColorValue(final float fHue, final float fSaturation, final float fLightness, final float fOpacity); @Nonnull @Nonempty static String getHexColorValue(final int nRed, final int nGreen, final int nBlue); @Nonnull @Nonempty static float [] getRGBAsHSLValue(final int nRed, final int nGreen, final int nBlue); @Nonnull @Nonempty static int [] getHSLAsRGBValue(final float fHue, final float fSaturation, final float fLightness); static final int RGB_MIN; static final int RGB_MAX; static final int RGB_RANGE; static final int HSL_MIN; static final int HSL_MAX; static final int HSL_RANGE; static final int PERCENTAGE_MIN; static final int PERCENTAGE_MAX; static final float OPACITY_MIN; static final float OPACITY_MAX; }### Answer:
@Test public void testParsedRGBColor () { CSSRGB aRGB = CSSColorHelper.getParsedRGBColorValue ("rgb(1,2,3)"); assertNotNull (aRGB); assertEquals ("1", aRGB.getRed ()); assertEquals ("2", aRGB.getGreen ()); assertEquals ("3", aRGB.getBlue ()); aRGB = CSSColorHelper.getParsedRGBColorValue (" rgb ( 1 , 2 , 3 ) "); assertNotNull (aRGB); assertEquals ("1", aRGB.getRed ()); assertEquals ("2", aRGB.getGreen ()); assertEquals ("3", aRGB.getBlue ()); assertNull (CSSColorHelper.getParsedRGBColorValue (null)); assertNull (CSSColorHelper.getParsedRGBColorValue ("")); assertNull (CSSColorHelper.getParsedRGBColorValue ("rgb(1,2,3")); }