code: public ValidateFieldResult<String> validateAndConvert (String string) {
          ValidateFieldResult<String> result = new ValidateFieldResult<>(string);
          try {
              if (string.length() != 6) {
                  result.errors.add(NewGTFSError.forFeed(NewGTFSErrorType.COLOR_FORMAT, string));
              }
              int integer = Integer.parseInt(string, 16);
              return result; // Could also store the integer.
          } catch (Exception ex) {
              throw new StorageException(NewGTFSErrorType.COLOR_FORMAT, string);
          }
      }
docs: Check that a string can be properly parsed and is in range.