code: public static boolean canParseColor(final String colorString) {
          try {
              return ColorParser.toColor(colorString) != null;
          } catch (Exception exc) {
              return false;
          }
      }
docs: Check if the given color string can be parsed.
  
  @param colorString The color to parse.