### Question:
CSSColorHelper { public static boolean isHexColorValue (@Nullable final String sValue) { final String sRealValue = StringHelper.trim (sValue); return StringHelper.hasText (sRealValue) && sRealValue.charAt (0) == CCSSValue.PREFIX_HEX && RegExHelper.stringMatchesPattern (PATTERN_HEX, sRealValue); } 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 testIsHexColorValue () { final String [] HEX_COLORS = new String [] { "#000000", "#99aa00", "#9900aa", "#aa9900", "#ffffff", "#aaa", "#000", "#123", "#000" }; for (final String sHexColor : HEX_COLORS) { assertTrue (sHexColor, CSSColorHelper.isHexColorValue (sHexColor)); assertTrue (sHexColor, CSSColorHelper.isColorValue (sHexColor)); } assertFalse (CSSColorHelper.isHexColorValue ("123456")); assertFalse (CSSColorHelper.isHexColorValue ("#")); assertFalse (CSSColorHelper.isHexColorValue ("#1")); assertFalse (CSSColorHelper.isHexColorValue ("#12")); assertFalse (CSSColorHelper.isHexColorValue ("#1234")); assertFalse (CSSColorHelper.isHexColorValue ("#12345")); assertFalse (CSSColorHelper.isHexColorValue ("#1234567")); }