code: 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);
    }
docs: Check if the passed String is valid CSS hex color value. Example value:
  <code>#ff0000</code>
  
  @param sValue
  The value to check. May be <code>null</code>.
  @return <code>true</code> if it is a CSS hex color value,
  <code>false</code> if not